PHP 8.5.0 Alpha 4 available for testing

Voting

: one minus one?
(Example: nine)

The Note You're Voting On

james at gogo dot co dot nz
20 years ago
It's worth noting that references to an array don't have thier own array pointer, and taking a reference to an array doesn't reset it's array pointer, so this works as you would expect it would by eaching the first three items of the array, rather than the first item 3 times.

<?php
$x
= array(1,2,3);

print_r(each($x));
echo
"\n";

$y =& $x;
print_r(each($y));
echo
"\n";

$z =& $y;
print_r(each($z));
echo
"\n";
?>

<< Back to user notes page

To Top