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-- ReflectionClass::hasConstant() - error cases --CREDITS-- Robin Fernandes <robinf@..
Decoded Output download
--TEST--
ReflectionClass::hasConstant() - error cases
--CREDITS--
Robin Fernandes <[email protected]>
Steve Seear <[email protected]>
--FILE--
<?php
class C {
const myConst = 1;
}
$rc = new ReflectionClass("C");
echo "Check invalid params:
";
var_dump($rc->hasConstant(1));
var_dump($rc->hasConstant(1.5));
var_dump($rc->hasConstant(true));
?>
--EXPECT--
Check invalid params:
bool(false)
bool(false)
bool(false)
Did this file decode correctly?
Original Code
--TEST--
ReflectionClass::hasConstant() - error cases
--CREDITS--
Robin Fernandes <[email protected]>
Steve Seear <[email protected]>
--FILE--
<?php
class C {
const myConst = 1;
}
$rc = new ReflectionClass("C");
echo "Check invalid params:\n";
var_dump($rc->hasConstant(1));
var_dump($rc->hasConstant(1.5));
var_dump($rc->hasConstant(true));
?>
--EXPECT--
Check invalid params:
bool(false)
bool(false)
bool(false)
Function Calls
None |
Stats
MD5 | c518e7fdadfe8d6acdd7becfcc19135d |
Eval Count | 0 |
Decode Time | 86 ms |