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