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 constants with inheritance --SKIPIF-- <?..
Decoded Output download
--TEST--
runkit_import() Importing and overriding constants with inheritance
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(array_shift(explode(".", PHP_VERSION)) < 5) print "skip"
?>
--FILE--
<?php
class Test {
const C = 1;
const D = "aaa";
const E = 3;
}
class Test1 extends Test {
}
runkit_import(dirname(__FILE__) . '/runkit_import_constants_and_inheritance.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
var_dump(Test::C);
var_dump(Test::D);
var_dump(Test::E);
var_dump(Test1::C);
var_dump(Test1::D);
var_dump(Test1::E);
runkit_constant_remove('Test1::E');
var_dump(Test::E);
runkit_constant_remove('Test::E');
?>
--EXPECT--
int(4)
string(4) "bbbb"
int(6)
int(4)
string(4) "bbbb"
int(6)
int(6)
Did this file decode correctly?
Original Code
--TEST--
runkit_import() Importing and overriding constants with inheritance
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(array_shift(explode(".", PHP_VERSION)) < 5) print "skip"
?>
--FILE--
<?php
class Test {
const C = 1;
const D = "aaa";
const E = 3;
}
class Test1 extends Test {
}
runkit_import(dirname(__FILE__) . '/runkit_import_constants_and_inheritance.inc', RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_OVERRIDE);
var_dump(Test::C);
var_dump(Test::D);
var_dump(Test::E);
var_dump(Test1::C);
var_dump(Test1::D);
var_dump(Test1::E);
runkit_constant_remove('Test1::E');
var_dump(Test::E);
runkit_constant_remove('Test::E');
?>
--EXPECT--
int(4)
string(4) "bbbb"
int(6)
int(4)
string(4) "bbbb"
int(6)
int(6)
Function Calls
extension_loaded | 1 |
Stats
MD5 | a96797d1229871fdda3e0c7cde42ddfa |
Eval Count | 0 |
Decode Time | 115 ms |