Voting

: three plus two?
(Example: nine)

The Note You're Voting On

Carlos
19 years ago
in the example below, you would get the same result if you change the function to something like:

function test_ref(&$arr) {
$time = time();
$size = sizeof($arr); // <--- this makes difference...
for($n=0; $n<$size; $n++) {
$x = 1;
}

echo "<br />The function using a reference took ".(time() - $time)." s";
}

<< Back to user notes page

To Top