bug78239.phpt 548 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #78239: Deprecation notice during string conversion converted to exception hangs
  3. --EXTENSIONS--
  4. zend_test
  5. --FILE--
  6. <?php
  7. function handleError($level, $message, $file = '', $line = 0, $context = [])
  8. {
  9. throw new ErrorException($message, 0, $level, $file, $line);
  10. }
  11. set_error_handler('handleError');
  12. $r = new _ZendTestClass;
  13. (string)$r ?: "";
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Uncaught ErrorException: Method _ZendTestClass::__toString() is deprecated in %s:%d
  17. Stack trace:
  18. #0 %s(%d): handleError(%s)
  19. #1 {main}
  20. thrown in %s on line %d