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 gettype() & settype() functions : error conditions --FILE-- <?php /* Test di..
Decoded Output download
**** Testing gettype() and settype() functions ****
*** Testing settype(): error conditions ***
Did this file decode correctly?
Original Code
--TEST--
Test gettype() & settype() functions : error conditions
--FILE--
<?php
/* Test different error conditions of settype() and gettype() functions */
echo "**** Testing gettype() and settype() functions ****\n";
echo "\n*** Testing settype(): error conditions ***\n";
// passing an invalid type to set
try {
settype( $var, "unknown" );
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
echo "Done\n";
?>
--EXPECT--
**** Testing gettype() and settype() functions ****
*** Testing settype(): error conditions ***
settype(): Argument #2 ($type) must be a valid type
Done
Function Calls
None |
Stats
MD5 | ec814b247fbf08adb9d9a6b227a9a7d9 |
Eval Count | 0 |
Decode Time | 75 ms |