3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($arg) { $arg = 2; throw new Exception; } try { foo(1); } catch (Exception $e) { echo $e; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
143.93 ms | 2150 KiB | 11 Q