$iterations = 1_000_000; $foo = $bar = $baz = "some string"; $function = $_SERVER['argv'][1](...); $function($iterations, $foo, $bar, $baz); function a($i, $foo, $bar, $baz) { while($i--) $a = "$foo-$bar-$baz"; } function b($i, $foo, $bar, $baz) { while($i--) $b = $foo . "-" . $bar . "-" . $baz; } function c($i, $foo, $bar, $baz) { while($i--) $c = \sprintf("%s-%s-%s", $foo, $bar, $baz); } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $iterations = 1_000_000; $function = $_SERVER['argv'][1](...); 1 $foo = $bar = $baz = "some string"; 2 3 4 $function($iterations, $foo, $bar, $baz); 5 6 function a($i, $foo, $bar, $baz) { 7 while($i--) 8 $a = "$foo-$bar-$baz"; 9 } 10 function b($i, $foo, $bar, $baz) { 11 while($i--) 12 $b = $foo . "-" . $bar . "-" . $baz; 13 } 14 function c($i, $foo, $bar, $baz) { 15 while($i--) 16 $c = \sprintf("%s-%s-%s", $foo, $bar, $baz); 17 } 18 $a = "$foo-$bar-$baz"; $b = $foo . "-" . $bar . "-" . $baz; $c = \sprintf("%s-%s-%s", $foo, $bar, $baz); $iterations = 1_000_000; 1 $foo = $bar = $baz = "some string"; 2 3 $function = $_SERVER['argv'][1](...); 4 $function($iterations, $foo, $bar, $baz); 5 6 function a($i, $foo, $bar, $baz) { 7 while($i--) 8 9 } 10 function b($i, $foo, $bar, $baz) { 11 while($i--) 12 13 } 14 function c($i, $foo, $bar, $baz) { 15 while($i--) 16 17 } 18