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 strncasecmp() function : error conditions --FILE-- <?php echo "*** Testing s..
Decoded Output download
*** Testing strncasecmp() function: error conditions ***
-- Testing strncasecmp() function with invalid argument --
Did this file decode correctly?
Original Code
--TEST--
Test strncasecmp() function : error conditions
--FILE--
<?php
echo "*** Testing strncasecmp() function: error conditions ***\n";
$str1 = 'string_val';
$str2 = 'string_val';
echo "-- Testing strncasecmp() function with invalid argument --\n";
$len = -10;
try {
var_dump( strncasecmp($str1, $str2, $len) );
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
*** Testing strncasecmp() function: error conditions ***
-- Testing strncasecmp() function with invalid argument --
strncasecmp(): Argument #3 ($length) must be greater than or equal to 0
Function Calls
| None |
Stats
| MD5 | a92a307722302f79eec5b9042d5f85a0 |
| Eval Count | 0 |
| Decode Time | 83 ms |