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-- runkit_import() Importing and overriding method with closure --SKIPIF-- <?php ..
Decoded Output download
--TEST--
runkit_import() Importing and overriding method with closure
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(version_compare(PHP_VERSION, '5.3.0', '<')) print "skip";
?>
--FILE--
<?php
class Test {
public function f() {
$f = function() {
echo "f
";
};
$f();
}
}
$t = new Test;
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_closure.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_FUNCTIONS | RUNKIT_IMPORT_OVERRIDE);
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_closure.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_FUNCTIONS | RUNKIT_IMPORT_OVERRIDE);
$t->f();
?>
--EXPECT--
f
IMPORTED: f
IMPORTED: f
Did this file decode correctly?
Original Code
--TEST--
runkit_import() Importing and overriding method with closure
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(version_compare(PHP_VERSION, '5.3.0', '<')) print "skip";
?>
--FILE--
<?php
class Test {
public function f() {
$f = function() {
echo "f\n";
};
$f();
}
}
$t = new Test;
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_closure.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_FUNCTIONS | RUNKIT_IMPORT_OVERRIDE);
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_closure.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_FUNCTIONS | RUNKIT_IMPORT_OVERRIDE);
$t->f();
?>
--EXPECT--
f
IMPORTED: f
IMPORTED: f
Function Calls
extension_loaded | 1 |
Stats
MD5 | 6d7fb49e58020449949a3572c05adbbf |
Eval Count | 0 |
Decode Time | 107 ms |