catch_static.phpt 309 B

1234567891011121314151617
  1. --TEST--
  2. Cannot catch "static"
  3. --FILE--
  4. <?php
  5. // This could in principle be supported, but isn't right now.
  6. class Test {
  7. public function method() {
  8. try {
  9. foo();
  10. } catch (static $e) {}
  11. }
  12. }
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Bad class name in the catch statement in %s on line %d