I had the bright idea of using a custom error handler which led me down a rabbit hole.
Following code gives (with and without custom error handler): Fatal er
Try this:
function foo(){ $a = array("a","b","c"); $b = array_pop($a); return $b; }