The 5th Annual China PHP Conference

Voting

Please answer this simple SPAM challenge: max(six, zero)?
(Example: nine)

The Note You're Voting On

Carlos
12 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