Created
February 21, 2013 14:02
-
-
Save mbrevda/5004913 to your computer and use it in GitHub Desktop.
PHP concatenate vs implode test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time php -r 'ini_set("memory_limit", "2048M");$a=[];for($i=0;$i<1000000;$i++){$a[]=$i;}implode($a);' | |
time php -r 'ini_set("memory_limit", "2048M");$a="";for($i=0;$i<1000000;$i++){$a.=$i;}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment