/hphp/test/zend/good/ext/standard/tests/serialize/bug62836_2.php
PHP | 13 lines | 10 code | 3 blank | 0 comment | 0 complexity | 20336059a643f0d49655db966121502f MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- $serialized_object='O:1:"A":4:{s:1:"b";O:1:"B":0:{}s:2:"b1";r:2;s:1:"c";O:1:"B":0:{}s:2:"c1";r:4;}';
- ini_set('unserialize_callback_func','mycallback');
- function mycallback($classname) {
- unserialize("i:4;");
- eval ("class $classname {} ");
- }
- print_r(unserialize($serialized_object));
- echo "okey";
- ?>