bug51791.phpt 267 B

1234567891011121314151617
  1. --TEST--
  2. Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
  3. --FILE--
  4. <?php
  5. class A {
  6. const B = 1;
  7. }
  8. try {
  9. constant('A::B1');
  10. } catch (Error $e) {
  11. echo $e->getMessage(), "\n";
  12. }
  13. ?>
  14. --EXPECT--
  15. Undefined constant A::B1