mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
29 lines
590 B
PHP
29 lines
590 B
PHP
--TEST--
|
|
Test finfo_close() function : basic functionality
|
|
--EXTENSIONS--
|
|
fileinfo
|
|
--FILE--
|
|
<?php
|
|
echo "*** Testing finfo_close() : basic functionality ***\n";
|
|
|
|
$magicFile = __DIR__ . 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 );
|
|
|
|
?>
|
|
--EXPECTF--
|
|
*** Testing finfo_close() : basic functionality ***
|
|
object(finfo)#%d (0) {
|
|
}
|
|
bool(true)
|
|
object(finfo)#%d (%d) {
|
|
}
|