bug35437.phpt 501 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #35437 (Segfault or Invalid Opcode 137/1/4)
  3. --FILE--
  4. <?php
  5. function err2exception($errno, $errstr)
  6. {
  7. throw new Exception("Error occuried: " . $errstr);
  8. }
  9. set_error_handler('err2exception');
  10. class TestClass
  11. {
  12. function testMethod()
  13. {
  14. $GLOBALS['t'] = new stdClass;
  15. }
  16. }
  17. try {
  18. TestClass::testMethod();
  19. } catch (Exception $e) {
  20. echo "Catched: ".$e->getMessage()."\n";
  21. }
  22. ?>
  23. --EXPECT--
  24. Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically