Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Test finfo_close() function : error conditions --EXTENSIONS-- fileinfo --FILE-- <..

Decoded Output download

*** Testing finfo_close() : error conditions ***

-- Testing finfo_close() function with wrong resource type --

Did this file decode correctly?

Original Code

--TEST--
Test finfo_close() function : error conditions
--EXTENSIONS--
fileinfo
--FILE--
<?php
echo "*** Testing finfo_close() : error conditions ***\n";

echo "\n-- Testing finfo_close() function with wrong resource type --\n";
$fp = fopen( __FILE__, 'r' );
try {
    var_dump( finfo_close( $fp ) );
} catch (TypeError $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
*** Testing finfo_close() : error conditions ***

-- Testing finfo_close() function with wrong resource type --
finfo_close(): Argument #1 ($finfo) must be of type finfo, resource given

Function Calls

fopen 1

Variables

$fp True

Stats

MD5 87675fdad039efc158c067e03aa5c642
Eval Count 0
Decode Time 96 ms