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-- Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass(..
Decoded Output download
--TEST--
Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass())
--FILE--
<?php
spl_autoload_register(function ($classname) {
echo "__autoload($classname)
";
eval("class $classname {}");
});
class B{
public function doit(A $a){
}
}
$ref = new reflectionMethod('B','doit');
$parameters = $ref->getParameters();
foreach($parameters as $parameter)
{
$class = $parameter->getClass();
echo $class->name."
";
}
echo "ok
";
?>
--EXPECTF--
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
__autoload(A)
A
ok
Did this file decode correctly?
Original Code
--TEST--
Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass())
--FILE--
<?php
spl_autoload_register(function ($classname) {
echo "__autoload($classname)\n";
eval("class $classname {}");
});
class B{
public function doit(A $a){
}
}
$ref = new reflectionMethod('B','doit');
$parameters = $ref->getParameters();
foreach($parameters as $parameter)
{
$class = $parameter->getClass();
echo $class->name."\n";
}
echo "ok\n";
?>
--EXPECTF--
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
__autoload(A)
A
ok
Function Calls
None |
Stats
MD5 | 9a2c236ca5d9e86da66d821bbd9cd948 |
Eval Count | 0 |
Decode Time | 79 ms |