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_function_redefine() and call from anonymous function --SKIPIF-- <?php if(..

Decoded Output download

--TEST--
runkit_function_redefine() and call from anonymous function
--SKIPIF--
<?php
	if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
	if(version_compare(PHP_VERSION, '5.3.0', '<')) print "skip";
?>
--INI--
error_reporting=E_ALL
display_errors=on
runkit.internal_override=On
--FILE--
<?php
function greet(){
	echo "hey
";
}
greet();
runkit_function_redefine("greet",'$name',"echo \"hey \$name
\";");
greet("you");
function parent() {
	$localvar = "john";
	$af = function() use ($localvar){
		greet($localvar);
	};
	return $af;
}
$greet1 = parent();
$greet1();
runkit_function_redefine("greet",'$name',"echo \"hello \$name
\";");
$greet1();
--EXPECT--
hey
hey you
hey john
hello john

 ?>

Did this file decode correctly?

Original Code

--TEST--
runkit_function_redefine() and call from anonymous function
--SKIPIF--
<?php
	if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
	if(version_compare(PHP_VERSION, '5.3.0', '<')) print "skip";
?>
--INI--
error_reporting=E_ALL
display_errors=on
runkit.internal_override=On
--FILE--
<?php
function greet(){
	echo "hey\n";
}
greet();
runkit_function_redefine("greet",'$name',"echo \"hey \$name\n\";");
greet("you");
function parent() {
	$localvar = "john";
	$af = function() use ($localvar){
		greet($localvar);
	};
	return $af;
}
$greet1 = parent();
$greet1();
runkit_function_redefine("greet",'$name',"echo \"hello \$name\n\";");
$greet1();
--EXPECT--
hey
hey you
hey john
hello john

Function Calls

None

Variables

None

Stats

MD5 cb6d39d9d3437d9fd718ef85c28de477
Eval Count 0
Decode Time 93 ms