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-- removing magic __tostring method --SKIPIF-- <?php if(!extension_loaded("runkit") ..
Decoded Output download
--TEST--
removing magic __tostring method
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(array_shift(explode('.', PHP_VERSION)) < 5) print "skip";
?>
--FILE--
<?php
class Test {
function __tostring() {echo '__tostring';}
}
$a = new Test();
(string) $a;
runkit_method_remove("Test", "__tostring");
(string) $a;
?>
--EXPECTF--
__tostring
Catchable fatal error: Method Test::__toString() must return a string value in %s on line %d
Did this file decode correctly?
Original Code
--TEST--
removing magic __tostring method
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(array_shift(explode('.', PHP_VERSION)) < 5) print "skip";
?>
--FILE--
<?php
class Test {
function __tostring() {echo '__tostring';}
}
$a = new Test();
(string) $a;
runkit_method_remove("Test", "__tostring");
(string) $a;
?>
--EXPECTF--
__tostring
Catchable fatal error: Method Test::__toString() must return a string value in %s on line %d
Function Calls
extension_loaded | 1 |
Stats
MD5 | 4696d1fe9611e31bf2498626e290b7ee |
Eval Count | 0 |
Decode Time | 105 ms |