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 class methods --SKIPIF-- <?php if(!exten..
Decoded Output download
--TEST--
runkit_import() Importing and overriding class methods
--SKIPIF--
<?php if(!extension_loaded("runkit")) print "skip"; ?>
--FILE--
<?php
error_reporting(E_ALL & ~E_STRICT);
class ParentClass {
function foo() {
echo "Parent::foo
";
}
}
include dirname(__FILE__) . '/runkit_import_methods1.inc';
ParentClass::foo();
Child::foo();
runkit_import(dirname(__FILE__) . '/runkit_import_methods2.inc', RUNKIT_IMPORT_CLASS_METHODS);
Child::foo();
runkit_import(dirname(__FILE__) . '/runkit_import_methods2.inc', RUNKIT_IMPORT_CLASS_METHODS | RUNKIT_IMPORT_OVERRIDE);
Child::foo();
--EXPECTF--
Parent::foo
Child1::foo
Notice: runkit_import(): %child::foo() already exists, not importing in %srunkit_import_methods.php on line %d
Child1::foo
Child2::foo
?>
Did this file decode correctly?
Original Code
--TEST--
runkit_import() Importing and overriding class methods
--SKIPIF--
<?php if(!extension_loaded("runkit")) print "skip"; ?>
--FILE--
<?php
error_reporting(E_ALL & ~E_STRICT);
class ParentClass {
function foo() {
echo "Parent::foo\n";
}
}
include dirname(__FILE__) . '/runkit_import_methods1.inc';
ParentClass::foo();
Child::foo();
runkit_import(dirname(__FILE__) . '/runkit_import_methods2.inc', RUNKIT_IMPORT_CLASS_METHODS);
Child::foo();
runkit_import(dirname(__FILE__) . '/runkit_import_methods2.inc', RUNKIT_IMPORT_CLASS_METHODS | RUNKIT_IMPORT_OVERRIDE);
Child::foo();
--EXPECTF--
Parent::foo
Child1::foo
Notice: runkit_import(): %child::foo() already exists, not importing in %srunkit_import_methods.php on line %d
Child1::foo
Child2::foo
Function Calls
None |
Stats
MD5 | a17b1f25afa92e60d34325e3aba37a47 |
Eval Count | 0 |
Decode Time | 113 ms |