3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $results = []; $aHash = []; $i = 0; $tmp = ''; while ($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); /* The Test */ $t = microtime(true); foreach ($aHash as $key => $val) $aHash[$key] .= "a"; echo (microtime(true) - $t) * 1000000;
Output for 7.1.0
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 3.814697265625
Output for 7.0.14
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 9.0599060058594
Output for 7.0.11
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 5.0067901611328
Output for 7.0.5, 7.0.9 - 7.0.10
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 4.0531158447266
Output for 7.0.1 - 7.0.3, 7.0.8
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 1.9073486328125
Output for 7.0.0, 7.0.7
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 2.8610229492188
Output for 7.0.6
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 3.0994415283203
Output for 7.0.4
Warning: array_fill() expects parameter 1 to be integer, float given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 2.1457672119141
Output for hhvm-3.13.2
Warning: array_fill() expects parameter 1 to be integer, double given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 87.976455688477
Output for hhvm-3.12.0
Warning: array_fill() expects parameter 1 to be integer, double given in /in/F1P7t on line 12 Warning: Invalid argument supplied for foreach() in /in/F1P7t on line 17 78.916549682617
Output for hhvm-3.10.0
735.99815368652
Output for 5.5.29, 5.6.28
411.9873046875
Output for 5.6.25
375.98609924316
Output for 5.6.24
338.07754516602
Output for 5.5.37, 5.6.23
308.03680419922
Output for 5.6.22
316.14303588867
Output for 5.6.21
427.9613494873
Output for 5.5.35, 5.6.20
307.08312988281
Output for 5.6.19
461.81678771973
Output for 5.6.18
315.90461730957
Output for 5.6.17
293.97010803223
Output for 5.6.16
304.9373626709
Output for 5.6.15
316.85829162598
Output for 5.6.14
306.12945556641
Output for 5.6.13
306.84471130371
Output for 5.4.13, 5.6.12
460.86311340332
Output for 5.6.11
368.11828613281
Output for 5.6.10
391.00646972656
Output for 5.6.9
402.92739868164
Output for 5.6.8
544.78645324707
Output for 5.4.15, 5.6.7
465.86990356445
Output for 5.6.6
485.89706420898
Output for 5.4.1, 5.6.5
428.91502380371
Output for 5.6.4
458.0020904541
Output for 5.4.10, 5.6.3
432.96813964844
Output for 5.6.2
517.12989807129
Output for 5.6.1
482.08236694336
Output for 5.6.0
407.93418884277
Output for 5.5.38
351.90582275391
Output for 5.5.36
427.0076751709
Output for 5.5.34
291.82434082031
Output for 5.5.33
329.97131347656
Output for 5.5.32
355.00526428223
Output for 5.5.10, 5.5.31
473.97613525391
Output for 5.5.30
382.90023803711
Output for 5.4.4, 5.5.28
478.02925109863
Output for 5.5.27
493.04962158203
Output for 5.5.26
389.81437683105
Output for 5.5.20, 5.5.25
488.9965057373
Output for 5.5.24
505.92422485352
Output for 5.5.23
611.0668182373
Output for 5.4.0, 5.5.1, 5.5.22
530.00450134277
Output for 5.5.14, 5.5.21
531.91184997559
Output for 5.5.19
515.22254943848
Output for 5.5.18
544.07119750977
Output for 5.5.16
545.97854614258
Output for 5.5.15
546.93222045898
Output for 5.5.13
370.97930908203
Output for 5.5.12
525.95138549805
Output for 5.5.11
658.03527832031
Output for 5.5.9
408.17260742188
Output for 5.4.6, 5.5.8
486.13548278809
Output for 5.5.7
504.97055053711
Output for 5.5.6
561.95259094238
Output for 5.5.5
483.98971557617
Output for 5.5.4
559.09156799316
Output for 5.5.3
475.88348388672
Output for 5.5.2
472.06878662109
Output for 5.5.0
536.91864013672
Output for 5.4.45
308.99047851562
Output for 5.4.44
373.12507629395
Output for 5.4.43
468.01567077637
Output for 5.4.35, 5.4.42
494.00329589844
Output for 5.4.41
457.0484161377
Output for 5.4.40
449.89585876465
Output for 5.4.39
566.95938110352
Output for 5.4.38
540.97175598145
Output for 5.4.37
586.98654174805
Output for 5.4.36
471.11511230469
Output for 5.4.34
502.8247833252
Output for 5.4.32
523.80561828613
Output for 5.4.31
750.06484985352
Output for 5.4.30
581.97975158691
Output for 5.4.29
446.79641723633
Output for 5.4.28
500.91743469238
Output for 5.4.27
509.97734069824
Output for 5.4.26
502.10952758789
Output for 5.4.25
509.02366638184
Output for 5.4.24
418.90144348145
Output for 5.4.23
359.05838012695
Output for 5.4.22
410.07995605469
Output for 5.4.21
529.05082702637
Output for 5.4.20
560.04524230957
Output for 5.4.19
432.01446533203
Output for 5.4.12, 5.4.18
524.04403686523
Output for 5.4.17
497.10273742676
Output for 5.4.16
487.08915710449
Output for 5.4.14
422.00088500977
Output for 5.4.11
468.96934509277
Output for 5.4.9
588.89389038086
Output for 5.4.8
489.95018005371
Output for 5.4.7
522.85194396973
Output for 5.4.5
431.06079101562
Output for 5.4.3
530.95817565918
Output for 5.4.2
503.0632019043
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/F1P7t on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/F1P7t on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/F1P7t on line 2
Process exited with code 255.