3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { (function () { return "string" + throw null ?? throw new Exception('return throw null ?? throw new Exception();'); })(); } catch (Exception $e) { var_dump($e->getMessage()); } try { (function () { return "string1" . 5 . "ok" / throw throw throw throw new Exception("cool"); })(); } catch (Exception $e) { var_dump($e->getMessage()); }

preferences:
40.79 ms | 404 KiB | 5 Q