bug55007.phpt 586 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #55007 (compiler fail after previous fail)
  3. --FILE--
  4. <?php
  5. spl_autoload_register(function ($classname) {
  6. if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[]; } }');
  7. if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }');
  8. });
  9. function shutdown() {
  10. new MyErrorHandler();
  11. }
  12. register_shutdown_function('shutdown');
  13. new CompileErrorClass();
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d
  17. My error handler runs.