ScotlandPHP 2019


Please answer this simple SPAM challenge: one plus four?
(Example: nine)

The Note You're Voting On

13 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