3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string1 = 'aaaaaaaaaaaaaaaaaaaa'; $string2 = 'bbbbbbbbbbbbbbbbbbbb'; $string3 = 'cccccccccccccccccccc'; $string4 = 'dddddddddddddddddddd'; $string5 = 'eeeeeeeeeeeeeeeeeeee'; $time1 = microtime(true); for ($k = 0; $k<1000000; $k++) { $concatTest1 = $string1 . $string2 . $string3 . $string4 . $string5; } $time2 = microtime(true); $testDuration1 = $time2 - $time1; echo "Test 1 took $testDuration1 Seconds"; $time3 = microtime(true); for ($m = 0; $m<1000000; $m++) { $concatTest2 = "{$string1}{$string2}{$string3}{$string4}{$string5}"; } $time4 = microtime(true); $testDuration2 = $time4 - $time3; echo "Test 2 took $testDuration2 Seconds"; $time5 = microtime(true); for ($p = 0; $p<1000000; $p++) { $concatTest3 = implode('', array($string1, $string2, $string3, $string4, $string5)); } $time6 = microtime(true); $testDuration3 = $time6 - $time5; echo "Test 3 took $testDuration3 Seconds";

Abusive script

This script was stopped while abusing our resources

Output for 5.4.17
Test 1 took 0.23074293136597 SecondsTest 2 took 0.24459791183472 SecondsTest 3 took 0.59788203239441 Seconds
Output for 5.4.16
Test 1 took 0.24809408187866 SecondsTest 2 took 0.22375798225403 SecondsTest 3 took 0.54761910438538 Seconds
Output for 5.4.15
Test 1 took 0.22979497909546 SecondsTest 2 took 0.30147695541382 SecondsTest 3 took 0.52654099464417 Seconds
Output for 5.4.14
Test 1 took 0.22805190086365 SecondsTest 2 took 0.27785801887512 SecondsTest 3 took 0.56112098693848 Seconds
Output for 5.4.13
Test 1 took 0.26875495910645 SecondsTest 2 took 0.23209190368652 SecondsTest 3 took 0.53285598754883 Seconds
Output for 5.4.12
Test 1 took 0.30128502845764 SecondsTest 2 took 0.27224111557007 SecondsTest 3 took 0.63252115249634 Seconds
Output for 5.4.11
Test 1 took 0.24346089363098 SecondsTest 2 took 0.2374210357666 SecondsTest 3 took 0.63874793052673 Seconds
Output for 5.4.10
Test 1 took 0.23750591278076 SecondsTest 2 took 0.26245594024658 SecondsTest 3 took 0.58683109283447 Seconds
Output for 5.4.9
Test 1 took 0.29074001312256 SecondsTest 2 took 0.23133397102356 SecondsTest 3 took 0.52129220962524 Seconds
Output for 5.4.8
Test 1 took 0.25311589241028 SecondsTest 2 took 0.33520793914795 SecondsTest 3 took 0.57037901878357 Seconds
Output for 5.4.7
Test 1 took 0.27211999893188 SecondsTest 2 took 0.26187920570374 SecondsTest 3 took 0.7230281829834 Seconds
Output for 5.4.6
Test 1 took 0.2312548160553 SecondsTest 2 took 0.22345590591431 SecondsTest 3 took 0.60498595237732 Seconds
Output for 5.4.5
Test 1 took 0.25824689865112 SecondsTest 2 took 0.24498105049133 SecondsTest 3 took 0.534747838974 Seconds
Output for 5.4.4
Test 1 took 0.24658703804016 SecondsTest 2 took 0.22480702400208 SecondsTest 3 took 0.58230996131897 Seconds
Output for 5.4.3
Test 1 took 0.25298380851746 SecondsTest 2 took 0.25925493240356 SecondsTest 3 took 0.60262107849121 Seconds
Output for 5.4.2
Test 1 took 0.24495315551758 SecondsTest 2 took 0.37272191047668 SecondsTest 3 took 0.80708312988281 Seconds
Output for 5.4.1
Test 1 took 0.32853603363037 SecondsTest 2 took 0.28533911705017 SecondsTest 3 took 0.61827492713928 Seconds
Output for 5.4.0
Test 1 took 0.23095297813416 SecondsTest 2 took 0.22878193855286 SecondsTest 3 took 0.55678486824036 Seconds
Output for 5.3.27
Test 1 took 0.23437809944153 SecondsTest 2 took 0.28312087059021 SecondsTest 3 took 0.55829310417175 Seconds
Output for 5.3.26
Test 1 took 0.22885584831238 SecondsTest 2 took 0.30857396125793 SecondsTest 3 took 0.54753303527832 Seconds
Output for 5.3.25
Test 1 took 0.26586818695068 SecondsTest 2 took 0.2455370426178 SecondsTest 3 took 0.67295289039612 Seconds
Output for 5.3.24
Test 1 took 0.25423192977905 SecondsTest 2 took 0.22786808013916 SecondsTest 3 took 0.63509297370911 Seconds
Output for 5.3.23
Test 1 took 0.22280406951904 SecondsTest 2 took 0.23712015151978 SecondsTest 3 took 0.63155198097229 Seconds
Output for 5.3.22
Test 1 took 0.2417459487915 SecondsTest 2 took 0.23791790008545 SecondsTest 3 took 0.65007400512695 Seconds
Output for 5.3.21
Test 1 took 0.25408411026001 SecondsTest 2 took 0.31835699081421 SecondsTest 3 took 0.55794215202332 Seconds
Output for 5.3.20
Test 1 took 0.25505995750427 SecondsTest 2 took 0.23466610908508 SecondsTest 3 took 0.72208595275879 Seconds
Output for 5.3.19
Test 1 took 0.22907400131226 SecondsTest 2 took 0.23214292526245 SecondsTest 3 took 0.61173796653748 Seconds
Output for 5.3.18
Test 1 took 0.23575496673584 SecondsTest 2 took 0.24064087867737 SecondsTest 3 took 0.6428120136261 Seconds
Output for 5.3.17
Test 1 took 0.26810812950134 SecondsTest 2 took 0.35110402107239 SecondsTest 3 took 0.61940693855286 Seconds
Output for 5.3.16
Test 1 took 0.29598903656006 SecondsTest 2 took 0.25757193565369 SecondsTest 3 took 0.6470320224762 Seconds
Output for 5.3.15
Test 1 took 0.23826313018799 SecondsTest 2 took 0.25670289993286 SecondsTest 3 took 0.67660212516785 Seconds
Output for 5.3.14
Test 1 took 0.23567700386047 SecondsTest 2 took 0.25339913368225 SecondsTest 3 took 0.68126487731934 Seconds
Output for 5.3.13
Test 1 took 0.21898508071899 SecondsTest 2 took 0.25730013847351 SecondsTest 3 took 0.68842697143555 Seconds
Output for 5.3.12
Test 1 took 0.27902102470398 SecondsTest 2 took 0.23139500617981 SecondsTest 3 took 0.61615109443665 Seconds
Output for 5.3.11
Test 1 took 0.29820489883423 SecondsTest 2 took 0.24067711830139 SecondsTest 3 took 0.63525104522705 Seconds
Output for 5.3.10
Test 1 took 0.25712394714355 SecondsTest 2 took 0.2270450592041 SecondsTest 3 took 0.67628002166748 Seconds
Output for 5.3.9
Test 1 took 0.23410487174988 SecondsTest 2 took 0.25752305984497 SecondsTest 3 took 0.61523008346558 Seconds
Output for 5.3.8
Test 1 took 0.25410008430481 SecondsTest 2 took 0.29519295692444 SecondsTest 3 took 0.60202598571777 Seconds
Output for 5.3.7
Test 1 took 0.25727200508118 SecondsTest 2 took 0.26150488853455 SecondsTest 3 took 0.59347796440125 Seconds
Output for 5.3.6
Test 1 took 0.22296905517578 SecondsTest 2 took 0.24305701255798 SecondsTest 3 took 0.61917114257812 Seconds
Output for 5.3.5
Test 1 took 0.23596596717834 SecondsTest 2 took 0.23963189125061 SecondsTest 3 took 0.61796617507935 Seconds
Output for 5.3.4
Test 1 took 0.22389984130859 SecondsTest 2 took 0.22573304176331 SecondsTest 3 took 0.57434701919556 Seconds
Output for 5.2.17
Test 1 took 0.2509880065918 SecondsTest 2 took 0.26689410209656 SecondsTest 3 took 0.6823558807373 Seconds
Output for 5.2.16
Test 1 took 0.24974417686462 SecondsTest 2 took 0.31247210502625 SecondsTest 3 took 0.61882901191711 Seconds
Output for 5.2.15
Test 1 took 0.30464601516724 SecondsTest 2 took 0.3002598285675 SecondsTest 3 took 0.69583797454834 Seconds