bug65254.phpt 321 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #65254 (Exception not catchable when exception thrown in autoload with a namespace)
  3. --FILE--
  4. <?php
  5. function __autoload($class)
  6. {
  7. eval("namespace ns_test; class test {}");
  8. throw new \Exception('abcd');
  9. }
  10. try
  11. {
  12. \ns_test\test::go();
  13. }
  14. catch (Exception $e)
  15. {
  16. echo 'caught';
  17. }
  18. --EXPECT--
  19. caught