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 a static variable --SKIPIF--..
Decoded Output download
--TEST--
runkit_import() Importing and overriding method with a static variable
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
?>
--FILE--
<?php
class Test {
function f() {
static $v = 0;
$v++;
echo $v, "
";
}
}
$t = new Test;
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_static_var.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_static_var.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
$t->f();
?>
--EXPECT--
1
2
2
Did this file decode correctly?
Original Code
--TEST--
runkit_import() Importing and overriding method with a static variable
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
?>
--FILE--
<?php
class Test {
function f() {
static $v = 0;
$v++;
echo $v, "\n";
}
}
$t = new Test;
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_static_var.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
$t->f();
runkit_import(dirname(__FILE__) . '/runkit_import_method_with_static_var.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
$t->f();
?>
--EXPECT--
1
2
2
Function Calls
extension_loaded | 1 |
Stats
MD5 | 1a512abbe5804a5352b36a7ddf222f5c |
Eval Count | 0 |
Decode Time | 86 ms |