Skip to content

Instantly share code, notes, and snippets.

@huang47
Created February 6, 2010 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huang47/296518 to your computer and use it in GitHub Desktop.
Save huang47/296518 to your computer and use it in GitHub Desktop.
<?php
$counts = 1000000;
$var = "ABCFDSFDSA";
$s1 = time();
for($i = 0; $i < $counts; $i++){
echo 'XD' . 'XD';
}
$s2 = time();
for($i = 0; $i < $counts; $i++){
echo "XD" . "XD";
}
$s3 = time();
for($i = 0; $i < $counts; $i++){
echo 'XD', 'XD';
}
$s4 = time();
for($i = 0; $i < $counts; $i++){
echo "XD", "XD";
}
$s5 = time();
echo '<br/>';
echo $s2-$s1, "<br/>";
echo $s3-$s2, "<br/>";
echo $s4-$s3, "<br/>";
echo $s5-$s4, "<br/>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment