3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 2, 3]; try { $ressult = array_map(function($data) { throw new Exception("force exception"); }, $array); } catch(Exception $e) { echo $e->getMessage(); }

preferences:
43.99 ms | 402 KiB | 5 Q