3v4l.org

run code in 300+ PHP versions simultaneously
<?php function failMapException() { try { array_map(function ($n) { throw new \Exception('oops'); }, [1, 2, 3]); } catch (\Exception $e) { } } failMapException();

preferences:
49.84 ms | 402 KiB | 5 Q