PageRenderTime 48ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/hphp/test/zend/good/ext/standard/tests/serialize/bug62836_2.php

http://github.com/facebook/hiphop-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
  1. <?php
  2. $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;}';
  3. ini_set('unserialize_callback_func','mycallback');
  4. function mycallback($classname) {
  5. unserialize("i:4;");
  6. eval ("class $classname {} ");
  7. }
  8. print_r(unserialize($serialized_object));
  9. echo "okey";
  10. ?>