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
I think that now (since php 5) it should be:
function &foo(){ //NOTICE THE &
$b=array_pop(array("a","b","c"));
return $b;
}
print_r(foo());
and
function &foo(){ //NOTICE THE &
$a=explode( '/' , 'a/b/c');
$c=array_pop(array_slice($a, $b = -2, $c = 1)); //NOW NO DIRECT VALUES ARE PASSED IT MUST BE VARIABLES
return $c;
}
print_r(foo());
but i'm just a begginer :)