3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo () { throw new \Exception("For example you gave me a multidimesional array dude, I'm not built for that!"); } try { array_map('foo', [1]); } catch(\Exception $e) { echo 'I should have validated this... ಥ_ಥ'; }

preferences:
29.3 ms | 402 KiB | 5 Q