bug73350.phpt 511 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #73350 (Exception::__toString() cause circular references)
  3. --FILE--
  4. <?php
  5. $e = new Exception();
  6. // This line cause problem :(
  7. // Comment it to see the difference.
  8. (string) $e;
  9. // This line show the clue (PHP Warning: ...).
  10. var_export($e);
  11. ?>
  12. --EXPECTF--
  13. Exception::__set_state(array(
  14. 'message' => '',
  15. 'string' => 'Exception in %sbug73350.php:%d
  16. Stack trace:
  17. #0 {main}',
  18. 'code' => 0,
  19. 'file' => '%sbug73350.php',
  20. 'line' => %d,
  21. 'trace' =>
  22. array (
  23. ),
  24. 'previous' => NULL,
  25. ))