mirror of
https://github.com/php/php-src.git
synced 2024-11-30 13:25:43 +08:00
36 lines
842 B
PHP
36 lines
842 B
PHP
--TEST--
|
|
Test finfo_close() function : basic functionality
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
/* Prototype : resource finfo_close(resource finfo)
|
|
* Description: Close fileinfo resource.
|
|
* Source code: ext/fileinfo/fileinfo.c
|
|
* Alias to functions:
|
|
*/
|
|
|
|
echo "*** Testing finfo_close() : basic functionality ***\n";
|
|
|
|
$magicFile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'magic';
|
|
|
|
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
|
|
var_dump( $finfo );
|
|
|
|
// Calling finfo_close() with all possible arguments
|
|
var_dump( finfo_close($finfo) );
|
|
|
|
$finfo = new finfo( FILEINFO_MIME, $magicFile );
|
|
var_dump( $finfo );
|
|
unset( $finfo );
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
*** Testing finfo_close() : basic functionality ***
|
|
resource(%d) of type (file_info)
|
|
bool(true)
|
|
object(finfo)#%d (%d) {
|
|
}
|
|
===DONE===
|