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() --CREDITS-- Marc Veldman <[email protected]> #tes..
Decoded Output download
--TEST--
ReflectionClass::hasConstant()
--CREDITS--
Marc Veldman <[email protected]>
#testfest roosendaal on 2008-05-10
--FILE--
<?php
//New instance of class C - defined below
$rc = new ReflectionClass("C");
//Check if C has constant foo
var_dump($rc->hasConstant('foo'));
//C should not have constant bar
var_dump($rc->hasConstant('bar'));
Class C {
const foo=1;
}
?>
--EXPECT--
bool(true)
bool(false)
Did this file decode correctly?
Original Code
--TEST--
ReflectionClass::hasConstant()
--CREDITS--
Marc Veldman <[email protected]>
#testfest roosendaal on 2008-05-10
--FILE--
<?php
//New instance of class C - defined below
$rc = new ReflectionClass("C");
//Check if C has constant foo
var_dump($rc->hasConstant('foo'));
//C should not have constant bar
var_dump($rc->hasConstant('bar'));
Class C {
const foo=1;
}
?>
--EXPECT--
bool(true)
bool(false)
Function Calls
None |
Stats
MD5 | 289c24dd0c997f9225e8fb9c32cdcb84 |
Eval Count | 0 |
Decode Time | 99 ms |