A short quiz this time, but that doesn't make it less fun. Do you know the answer to all of them? Get a cup of coffee and kill 10 minutes with round two...
As always, think of the answer before you execute the code or look it up. You can find round one here.
Array pointer
What will the output be ?
$array =
range(0,
5);
next($array);
foreach($array as $v) { echo $v;
}
ArrayAccess and isset fun
isset or not isset, thats the question.
Typo?
The output might be confusing..
References
How many notices will be thrown?
error_reporting(E_ALL);
function a
( &
$array) {} function b
($array) {}a
($array);
b
($array);
Continue reading "PHP Quiz part 2"