3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $e = new Exception(); // This line cause problem :( // Comment it to see the difference. // (string) $e; // This line show the clue (PHP Warning: ...). var_export($e); // This line will be affected. var_export(json_encode([$e])); // But This line still OK. var_export(json_encode($e));
based on F49vv
Output for 5.6.0 - 7.3.1
Exception::__set_state(array( 'message' => '', 'string' => '', 'code' => 0, 'file' => '/in/Lgvq6', 'line' => 3, 'trace' => array ( ), 'previous' => NULL, ))'[{}]''{}'