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-- Bug #74454 (Wrong exception being thrown when using ReflectionMethod) --FILE-- <?..

Decoded Output download

--TEST--
Bug #74454 (Wrong exception being thrown when using ReflectionMethod)
--FILE--
<?php
spl_autoload_register('load_file');
try {
    $x = new ReflectionMethod('A', 'b');
} catch (\Throwable $e) {
    echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
}

function load_file() {
    require __DIR__ . '/bug74454.inc';
}
?>
--EXPECT--
ParseError: syntax error, unexpected token "if", expecting "function" or "const"

Did this file decode correctly?

Original Code

--TEST--
Bug #74454 (Wrong exception being thrown when using ReflectionMethod)
--FILE--
<?php
spl_autoload_register('load_file');
try {
    $x = new ReflectionMethod('A', 'b');
} catch (\Throwable $e) {
    echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
}

function load_file() {
    require __DIR__ . '/bug74454.inc';
}
?>
--EXPECT--
ParseError: syntax error, unexpected token "if", expecting "function" or "const"

Function Calls

spl_autoload_register 1

Variables

None

Stats

MD5 3ad15deac28ce41010fbcfc1368bf59b
Eval Count 0
Decode Time 82 ms