3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Initial Configuration global $aHash; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); // Test Source function Test2_1() { global $aHash; /* The Test */ $t = microtime(true); reset($aHash); foreach($aHash as $key=>$val) $aHash[$key] .= "a"; return (microtime(true) - $t); } // Variable Clean-up function Test2_End() { global $aHash; unset($aHash); } var_dump(Test2_1()); ?>
based on Ij9DA
Output for 7.0.14 - 7.1.0
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(8.1062316894531E-6)
Output for 7.0.1, 7.0.5 - 7.0.6, 7.0.11
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(5.9604644775391E-6)
Output for 7.0.7, 7.0.10
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(6.9141387939453E-6)
Output for 7.0.9
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(1.0967254638672E-5)
Output for 7.0.8
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(7.8678131103516E-6)
Output for 7.0.0, 7.0.4
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(5.0067901611328E-6)
Output for 7.0.2 - 7.0.3
Warning: array_fill() expects parameter 1 to be integer, float given in /in/Qlji3 on line 11 Warning: reset() expects parameter 1 to be array, null given in /in/Qlji3 on line 20 Warning: Invalid argument supplied for foreach() in /in/Qlji3 on line 21 float(7.1525573730469E-6)
Output for 5.6.28
float(0.00040888786315918)
Output for 5.6.26
float(0.00043106079101562)
Output for 5.6.25
float(0.00053286552429199)
Output for 5.6.24
float(0.00046396255493164)
Output for 5.6.23
float(0.0004270076751709)
Output for 5.6.22
float(0.00044488906860352)
Output for 5.6.21
float(0.00041890144348145)
Output for 5.6.20
float(0.00037002563476562)
Output for 5.6.19
float(0.00043606758117676)
Output for 5.6.18
float(0.00030803680419922)
Output for 5.6.17
float(0.00038790702819824)
Output for 5.6.16
float(0.00034809112548828)
Output for 5.5.33, 5.5.36, 5.6.15
float(0.00049805641174316)
Output for 5.6.14
float(0.00036787986755371)
Output for 5.6.13
float(0.00026488304138184)
Output for 5.6.12
float(0.00027894973754883)
Output for 5.6.11
float(0.00044393539428711)
Output for 5.4.17, 5.6.10
float(0.00046205520629883)
Output for 5.6.9
float(0.00037598609924316)
Output for 5.1.6, 5.3.14, 5.4.27, 5.5.7, 5.6.8
float(0.00052094459533691)
Output for 5.2.13, 5.5.38, 5.6.7
float(0.00046110153198242)
Output for 5.6.6
float(0.00045680999755859)
Output for 5.4.11, 5.6.5
float(0.0005490779876709)
Output for 5.6.4
float(0.00053095817565918)
Output for 5.6.3
float(0.00041985511779785)
Output for 5.6.2
float(0.00049591064453125)
Output for 5.6.1
float(0.00053501129150391)
Output for 5.6.0
float(0.0005030632019043)
Output for 5.5.37
float(0.00050616264343262)
Output for 5.5.35
float(0.00049614906311035)
Output for 5.5.34
float(0.00038695335388184)
Output for 5.5.32
float(0.0005340576171875)
Output for 5.4.35, 5.5.31
float(0.00049185752868652)
Output for 5.5.30
float(0.00040078163146973)
Output for 5.5.29
float(0.00040602684020996)
Output for 5.1.4, 5.5.28
float(0.00043201446533203)
Output for 5.5.27
float(0.00037097930908203)
Output for 5.5.26
float(0.00034308433532715)
Output for 5.5.25
float(0.00051712989807129)
Output for 5.5.24
float(0.00038504600524902)
Output for 5.5.23
float(0.00043487548828125)
Output for 5.2.12, 5.3.7, 5.4.10, 5.5.12, 5.5.22
float(0.00052499771118164)
Output for 5.5.21
float(0.0005497932434082)
Output for 5.5.20
float(0.00045108795166016)
Output for 5.5.19
float(0.00046610832214355)
Output for 5.5.18
float(0.0006101131439209)
Output for 5.4.20, 5.5.16
float(0.00052309036254883)
Output for 5.5.15
float(0.00054121017456055)
Output for 5.3.27, 5.5.14
float(0.00052404403686523)
Output for 5.5.6, 5.5.13
float(0.00046300888061523)
Output for 5.3.3, 5.3.20, 5.5.11
float(0.00055503845214844)
Output for 5.5.10
float(0.00052595138549805)
Output for 5.5.9
float(0.00051999092102051)
Output for 5.4.18, 5.5.8
float(0.00049495697021484)
Output for 5.2.8, 5.4.2, 5.5.5
float(0.00055313110351562)
Output for 5.5.4
float(0.00049304962158203)
Output for 5.5.3
float(0.00049400329589844)
Output for 5.5.2
float(0.00047707557678223)
Output for 5.5.1
float(0.00041818618774414)
Output for 5.3.13, 5.5.0
float(0.00043511390686035)
Output for 5.4.45
float(0.00047421455383301)
Output for 5.4.44
float(0.00039792060852051)
Output for 5.4.43
float(0.00045418739318848)
Output for 5.4.42
float(0.00041604042053223)
Output for 5.3.19, 5.4.41
float(0.00042510032653809)
Output for 5.4.40
float(0.0004580020904541)
Output for 5.4.39
float(0.00047183036804199)
Output for 5.4.38
float(0.00034093856811523)
Output for 5.4.37
float(0.00035190582275391)
Output for 5.4.36
float(0.0003509521484375)
Output for 5.2.14, 5.4.34
float(0.00052189826965332)
Output for 5.4.32
float(0.00050806999206543)
Output for 5.4.31
float(0.00055789947509766)
Output for 5.4.23, 5.4.30
float(0.00055408477783203)
Output for 5.4.29
float(0.00055623054504395)
Output for 5.4.28
float(0.00051188468933105)
Output for 5.4.26
float(0.00056791305541992)
Output for 5.3.1, 5.3.25, 5.4.25
float(0.00050115585327148)
Output for 5.4.24
float(0.00041389465332031)
Output for 5.4.9, 5.4.22
float(0.00052714347839355)
Output for 5.3.29, 5.4.21
float(0.00048494338989258)
Output for 5.4.19
float(0.00040006637573242)
Output for 5.4.16
float(0.00047898292541504)
Output for 5.4.15
float(0.00048279762268066)
Output for 5.4.14
float(0.00048708915710449)
Output for 5.4.13
float(0.00044894218444824)
Output for 5.4.12
float(0.00054693222045898)
Output for 5.4.8
float(0.00049996376037598)
Output for 5.4.7
float(0.00050091743469238)
Output for 5.4.6
float(0.00057315826416016)
Output for 5.4.5
float(0.000518798828125)
Output for 5.4.4
float(0.00040411949157715)
Output for 5.1.2, 5.4.3
float(0.00049710273742676)
Output for 5.4.1
float(0.00035619735717773)
Output for 5.4.0
float(0.00050997734069824)
Output for 5.3.17, 5.3.28
float(0.00055909156799316)
Output for 5.3.26
float(0.00050902366638184)
Output for 5.3.24
float(0.00054502487182617)
Output for 5.3.23
float(0.00054717063903809)
Output for 5.3.22
float(0.00051093101501465)
Output for 5.3.21
float(0.00052618980407715)
Output for 5.0.0, 5.3.18
float(0.0005488395690918)
Output for 5.3.16
float(0.00054788589477539)
Output for 5.3.15
float(0.00051498413085938)
Output for 5.1.5, 5.3.12
float(0.0004119873046875)
Output for 5.3.11
float(0.00052213668823242)
Output for 5.3.0, 5.3.10
float(0.00056695938110352)
Output for 5.3.9
float(0.0005190372467041)
Output for 5.3.8
float(0.000579833984375)
Output for 5.3.6
float(0.00037407875061035)
Output for 5.3.5
float(0.00050497055053711)
Output for 5.3.4
float(0.00054597854614258)
Output for 5.3.2
float(0.00047397613525391)
Output for 5.2.17
float(0.00057506561279297)
Output for 5.2.16
float(0.00057792663574219)
Output for 5.2.15
float(0.00055289268493652)
Output for 5.2.11
float(0.00060677528381348)
Output for 5.2.10
float(0.0005028247833252)
Output for 5.2.9
float(0.00058698654174805)
Output for 5.2.7
float(0.00048208236694336)
Output for 5.2.6
float(0.00058197975158691)
Output for 5.2.5
float(0.00056600570678711)
Output for 5.2.4
float(0.00056195259094238)
Output for 5.2.3
float(0.00057005882263184)
Output for 5.2.2
float(0.00054287910461426)
Output for 5.2.1
float(0.00053906440734863)
Output for 5.2.0
float(0.00053215026855469)
Output for 5.1.3
float(0.00058913230895996)
Output for 5.1.1
float(0.00062108039855957)
Output for 5.1.0
float(0.00068187713623047)
Output for 5.0.5
float(0.00062894821166992)
Output for 5.0.4
float(0.00060892105102539)
Output for 5.0.3
float(0.00060582160949707)
Output for 5.0.2
float(0.00068497657775879)
Output for 5.0.1
float(0.00063610076904297)
Output for 4.4.9
float(0.000594)
Output for 4.4.8
float(0.000691)
Output for 4.4.7
float(0.000752)
Output for 4.4.6
float(0.000731)
Output for 4.4.5
float(0.000723)
Output for 4.4.4
float(0.000493)
Output for 4.4.3
float(0.000703)
Output for 4.4.2
float(0.000736)
Output for 4.4.1
float(0.000674)
Output for 4.4.0
float(0.000681)
Output for 4.3.11
float(0.000683)
Output for 4.3.10
float(0.00065)
Output for 4.3.9
float(0.000767)
Output for 4.3.8
float(0.000609)
Output for 4.3.7
float(0.000426)
Output for 4.3.6
float(0.000521)
Output for 4.3.5
float(0.000715)
Output for 4.3.4
float(0.000679)
Output for 4.3.3
float(0.000599)
Output for 4.3.2
float(0.000744)
Output for 4.3.1
float(0.000551)
Output for 4.3.0
float(0.000756)