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-- Request #38992 (invoke() and invokeArgs() static method calls should match) --FIL..
Decoded Output download
--TEST--
Request #38992 (invoke() and invokeArgs() static method calls should match)
--FILE--
<?php
class MyClass
{
public static function doSomething()
{
echo "Did it!
";
}
}
$r = new ReflectionMethod('MyClass', 'doSomething');
try {
$r->invoke('WTF?');
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
try {
$r->invokeArgs('WTF?', array());
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
?>
--EXPECT--
ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, string given
ReflectionMethod::invokeArgs(): Argument #1 ($object) must be of type ?object, string given
Did this file decode correctly?
Original Code
--TEST--
Request #38992 (invoke() and invokeArgs() static method calls should match)
--FILE--
<?php
class MyClass
{
public static function doSomething()
{
echo "Did it!\n";
}
}
$r = new ReflectionMethod('MyClass', 'doSomething');
try {
$r->invoke('WTF?');
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$r->invokeArgs('WTF?', array());
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, string given
ReflectionMethod::invokeArgs(): Argument #1 ($object) must be of type ?object, string given
Function Calls
None |
Stats
MD5 | db52080ef372973d0ea7292d48db8589 |
Eval Count | 0 |
Decode Time | 84 ms |