bind_static.phpt 344 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bind static may throw
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=1M
  8. --FILE--
  9. <?php
  10. function test() {
  11. static $N = UNDEFINED;
  12. throw new Exception;
  13. }
  14. try {
  15. test();
  16. } catch (Error $e) {
  17. echo $e->getMessage(), "\n";
  18. }
  19. ?>
  20. --EXPECT--
  21. Undefined constant "UNDEFINED"