- array_map: documentation ( source)
<?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... ಥ_ಥ';
}