3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $throw; $throw = false; function foo() { bar(); } function bar() { baz(); } function baz() { boom(); } function boom() { global $throw; if ($throw) { throw new RuntimeException(); } } function test($n) { for ($i = 0; $i < $n; $i++) { try { foo(); } catch (RuntimeException $e) { return false; } } } $n = 1000000; $t = microtime(true); test($n); echo (microtime(true) - $t)*1000000/$n . ' us/iteration';
Output for 7.4.1
0.11153483390808 us/iteration
Output for 7.4.0
0.12400603294373 us/iteration
Output for 7.3.13
0.14757013320923 us/iteration
Output for 7.3.12
0.14799094200134 us/iteration
Output for 7.3.11
0.14539694786072 us/iteration
Output for 7.3.10
0.1102991104126 us/iteration
Output for 7.3.9
0.12345504760742 us/iteration
Output for 7.3.8
0.11660003662109 us/iteration
Output for 7.3.7
0.10399699211121 us/iteration
Output for 7.3.6
0.097756147384644 us/iteration
Output for 7.3.5
0.11029410362244 us/iteration
Output for 7.3.4
0.10054016113281 us/iteration
Output for 7.3.3
0.10015201568604 us/iteration
Output for 7.3.2
0.096968173980713 us/iteration
Output for 7.3.1
0.12763214111328 us/iteration
Output for 7.3.0
0.1399359703064 us/iteration
Output for 7.2.26
0.11845183372498 us/iteration
Output for 7.2.25
0.16424894332886 us/iteration
Output for 7.2.24
0.14296388626099 us/iteration
Output for 7.2.23
0.14451217651367 us/iteration
Output for 7.2.22
0.17050004005432 us/iteration
Output for 7.2.21
0.11761903762817 us/iteration
Output for 7.2.20
0.12593507766724 us/iteration
Output for 7.2.19
0.14822006225586 us/iteration
Output for 7.2.18
0.11542391777039 us/iteration
Output for 7.2.17
0.1138129234314 us/iteration
Output for 7.2.16
0.11823582649231 us/iteration
Output for 7.2.15
0.1253969669342 us/iteration
Output for 7.2.14
0.12595200538635 us/iteration
Output for 7.2.13
0.12179780006409 us/iteration
Output for 7.2.12
0.11737585067749 us/iteration
Output for 7.2.11
0.1246030330658 us/iteration
Output for 7.2.10
0.12618899345398 us/iteration
Output for 7.2.9
0.11537194252014 us/iteration
Output for 7.2.8
0.12199592590332 us/iteration
Output for 7.2.7
0.12931895256042 us/iteration
Output for 7.2.6
0.12859892845154 us/iteration
Output for 7.2.5
0.11329412460327 us/iteration
Output for 7.2.4
0.1132640838623 us/iteration
Output for 7.2.3
0.11499404907227 us/iteration
Output for 7.2.2
0.11254692077637 us/iteration
Output for 7.2.1
0.11301302909851 us/iteration
Output for 7.2.0
0.11166310310364 us/iteration
Output for 7.1.33
0.25661778450012 us/iteration
Output for 7.1.32
0.25519514083862 us/iteration
Output for 7.1.31
0.22273397445679 us/iteration
Output for 7.1.30
0.23726105690002 us/iteration
Output for 7.1.29
0.23633909225464 us/iteration
Output for 7.1.28
0.24440979957581 us/iteration
Output for 7.1.27
0.27736806869507 us/iteration
Output for 7.1.26
0.24170589447021 us/iteration
Output for 7.1.25
0.23653602600098 us/iteration
Output for 7.1.24
0.24002504348755 us/iteration
Output for 7.1.23
0.22604489326477 us/iteration
Output for 7.1.22
0.2320339679718 us/iteration
Output for 7.1.21
0.24474096298218 us/iteration
Output for 7.1.20
0.22691106796265 us/iteration
Output for 7.1.19
0.22829604148865 us/iteration
Output for 7.1.18
0.23983812332153 us/iteration
Output for 7.1.17
0.22816896438599 us/iteration
Output for 7.1.16
0.24391102790833 us/iteration
Output for 7.1.15
0.23176097869873 us/iteration
Output for 7.1.14
0.2267107963562 us/iteration
Output for 7.1.13
0.22884798049927 us/iteration
Output for 7.1.12
0.22712588310242 us/iteration
Output for 7.1.11
0.22952103614807 us/iteration
Output for 7.1.10
0.22111296653748 us/iteration
Output for 7.1.9
0.2396559715271 us/iteration
Output for 7.1.8
0.22586989402771 us/iteration
Output for 7.1.7
0.2318639755249 us/iteration
Output for 7.1.6
0.22611498832703 us/iteration
Output for 7.1.5
0.2217960357666 us/iteration
Output for 7.1.4
0.24983501434326 us/iteration
Output for 7.1.3
0.22202610969543 us/iteration
Output for 7.1.2
0.21931600570679 us/iteration
Output for 7.1.1
0.22519111633301 us/iteration
Output for 7.1.0
0.2292799949646 us/iteration
Output for 7.0.33
0.21548414230347 us/iteration
Output for 7.0.32
0.2265100479126 us/iteration
Output for 7.0.31
0.26514101028442 us/iteration
Output for 7.0.30
0.24237608909607 us/iteration
Output for 7.0.29
0.21903491020203 us/iteration
Output for 7.0.28
0.22260999679565 us/iteration
Output for 7.0.27
0.21290707588196 us/iteration
Output for 7.0.26
0.21662998199463 us/iteration
Output for 7.0.25
0.2399799823761 us/iteration
Output for 7.0.24
0.26147198677063 us/iteration
Output for 7.0.23
0.22665405273438 us/iteration
Output for 7.0.22
0.22577905654907 us/iteration
Output for 7.0.21
0.24826407432556 us/iteration
Output for 7.0.20
0.26606297492981 us/iteration
Output for 7.0.19
0.26747918128967 us/iteration
Output for 7.0.18
0.24255394935608 us/iteration
Output for 7.0.17
0.22291612625122 us/iteration
Output for 7.0.16
0.21966099739075 us/iteration
Output for 7.0.15
0.25121998786926 us/iteration
Output for 7.0.14
0.24338698387146 us/iteration
Output for 7.0.13
0.2673008441925 us/iteration
Output for 7.0.12
0.24652910232544 us/iteration
Output for 7.0.11
0.24360704421997 us/iteration
Output for 7.0.10
0.25136590003967 us/iteration
Output for 7.0.9
0.25319409370422 us/iteration
Output for 7.0.8
0.20559692382812 us/iteration
Output for 7.0.7
0.19830107688904 us/iteration
Output for 7.0.6
0.22023510932922 us/iteration
Output for 7.0.5
0.22545194625854 us/iteration
Output for 7.0.4
0.22460699081421 us/iteration
Output for 7.0.3
0.23005890846252 us/iteration
Output for 7.0.2
0.22737097740173 us/iteration
Output for 7.0.1
0.24506902694702 us/iteration
Output for 7.0.0
0.24151206016541 us/iteration
Output for 5.6.40
0.37759208679199 us/iteration
Output for 5.6.39
0.38516688346863 us/iteration
Output for 5.6.38
0.41047286987305 us/iteration
Output for 5.6.37
0.40548205375671 us/iteration
Output for 5.6.36
0.42061710357666 us/iteration
Output for 5.6.35
0.39821600914001 us/iteration
Output for 5.6.34
0.42143106460571 us/iteration
Output for 5.6.33
0.4424090385437 us/iteration
Output for 5.6.32
0.50777697563171 us/iteration
Output for 5.6.31
0.40670204162598 us/iteration
Output for 5.6.30
0.45285701751709 us/iteration
Output for 5.6.29
0.47453308105469 us/iteration
Output for 5.6.28
0.47604584693909 us/iteration
Output for 5.6.27
0.48482799530029 us/iteration
Output for 5.6.26
0.38411116600037 us/iteration
Output for 5.6.25
0.39086079597473 us/iteration
Output for 5.6.24
0.39819693565369 us/iteration
Output for 5.6.23
0.41057705879211 us/iteration
Output for 5.6.22
0.50508689880371 us/iteration
Output for 5.6.21
0.42521905899048 us/iteration
Output for 5.6.20
0.42490696907043 us/iteration
Output for 5.6.19
0.44983077049255 us/iteration
Output for 5.6.18
0.51033186912537 us/iteration
Output for 5.6.17
0.37084794044495 us/iteration
Output for 5.6.16
0.39324593544006 us/iteration
Output for 5.6.15
0.40189814567566 us/iteration
Output for 5.6.14
0.45339393615723 us/iteration
Output for 5.6.13
0.44542407989502 us/iteration
Output for 5.6.12
0.41293907165527 us/iteration
Output for 5.6.11
0.39007496833801 us/iteration
Output for 5.6.10
0.41450905799866 us/iteration
Output for 5.6.9
0.46047902107239 us/iteration
Output for 5.6.8
0.45800590515137 us/iteration
Output for 5.6.7
0.39811706542969 us/iteration
Output for 5.6.6
0.48739695549011 us/iteration
Output for 5.6.5
0.4863018989563 us/iteration
Output for 5.6.4
0.37666320800781 us/iteration
Output for 5.6.3
0.5410590171814 us/iteration
Output for 5.6.2
0.50692105293274 us/iteration
Output for 5.6.1
0.52321600914001 us/iteration
Output for 5.6.0
0.40228915214539 us/iteration
Output for 5.5.38
0.42900681495667 us/iteration
Output for 5.5.37
0.47303509712219 us/iteration
Output for 5.5.36
0.4997730255127 us/iteration
Output for 5.5.35
0.37565302848816 us/iteration
Output for 5.5.34
0.47571897506714 us/iteration
Output for 5.5.33
0.52963900566101 us/iteration
Output for 5.5.32
0.44228982925415 us/iteration
Output for 5.5.31
0.45541596412659 us/iteration
Output for 5.5.30
0.383544921875 us/iteration
Output for 5.5.29
0.53153109550476 us/iteration
Output for 5.5.28
0.44077396392822 us/iteration
Output for 5.5.27
0.39290595054626 us/iteration
Output for 5.5.26
0.40260195732117 us/iteration
Output for 5.5.25
0.46041297912598 us/iteration
Output for 5.5.24
0.53050994873047 us/iteration
Output for 5.5.23
0.50970101356506 us/iteration
Output for 5.5.22
0.51504898071289 us/iteration
Output for 5.5.21
0.47187805175781 us/iteration
Output for 5.5.20
0.42941999435425 us/iteration
Output for 5.5.19
0.41316413879395 us/iteration
Output for 5.5.18
0.52856707572937 us/iteration
Output for 5.5.17
0.41905188560486 us/iteration
Output for 5.5.16
0.48022198677063 us/iteration
Output for 5.5.15
0.42417407035828 us/iteration
Output for 5.5.14
0.43960499763489 us/iteration
Output for 5.5.13
0.450031042099 us/iteration
Output for 5.5.12
0.42631912231445 us/iteration
Output for 5.5.11
0.47911405563354 us/iteration
Output for 5.5.10
0.51834797859192 us/iteration
Output for 5.5.9
0.41210603713989 us/iteration
Output for 5.5.8
0.42195200920105 us/iteration
Output for 5.5.7
0.45017886161804 us/iteration
Output for 5.5.6
0.4731388092041 us/iteration
Output for 5.5.5
0.53393006324768 us/iteration
Output for 5.5.4
0.50361585617065 us/iteration
Output for 5.5.3
0.42161703109741 us/iteration
Output for 5.5.2
0.42798209190369 us/iteration
Output for 5.5.1
0.37426996231079 us/iteration
Output for 5.5.0
0.43433880805969 us/iteration
Output for 5.4.45
0.54071307182312 us/iteration
Output for 5.4.44
0.4108829498291 us/iteration
Output for 5.4.43
0.41809916496277 us/iteration
Output for 5.4.42
0.48176407814026 us/iteration
Output for 5.4.41
0.41538500785828 us/iteration
Output for 5.4.40
0.54461097717285 us/iteration
Output for 5.4.39
0.4380669593811 us/iteration
Output for 5.4.38
0.52632999420166 us/iteration
Output for 5.4.37
0.3848078250885 us/iteration
Output for 5.4.36
0.42755818367004 us/iteration
Output for 5.4.35
0.54337406158447 us/iteration
Output for 5.4.34
0.52718901634216 us/iteration
Output for 5.4.33
0.46665191650391 us/iteration
Output for 5.4.32
0.41988205909729 us/iteration
Output for 5.4.31
0.45623683929443 us/iteration
Output for 5.4.30
0.5113160610199 us/iteration
Output for 5.4.29
0.52207708358765 us/iteration
Output for 5.4.28
0.4531238079071 us/iteration
Output for 5.4.27
0.43654799461365 us/iteration
Output for 5.4.26
0.43884778022766 us/iteration
Output for 5.4.25
0.44422101974487 us/iteration
Output for 5.4.24
0.43141222000122 us/iteration
Output for 5.4.23
0.43772006034851 us/iteration
Output for 5.4.22
0.51160907745361 us/iteration
Output for 5.4.21
0.42206597328186 us/iteration
Output for 5.4.20
0.49232792854309 us/iteration
Output for 5.4.19
0.46355509757996 us/iteration
Output for 5.4.18
0.40185499191284 us/iteration
Output for 5.4.17
0.4565749168396 us/iteration
Output for 5.4.16
0.48185896873474 us/iteration
Output for 5.4.15
0.52600479125977 us/iteration
Output for 5.4.14
0.48836708068848 us/iteration
Output for 5.4.13
0.39413690567017 us/iteration
Output for 5.4.12
0.45691895484924 us/iteration
Output for 5.4.11
0.42058086395264 us/iteration
Output for 5.4.10
0.38349390029907 us/iteration
Output for 5.4.9
0.50113892555237 us/iteration
Output for 5.4.8
0.50369501113892 us/iteration
Output for 5.4.7
0.56775093078613 us/iteration
Output for 5.4.6
0.44811797142029 us/iteration
Output for 5.4.5
0.47353196144104 us/iteration
Output for 5.4.4
0.46739888191223 us/iteration
Output for 5.4.3
0.55855703353882 us/iteration
Output for 5.4.2
0.49516987800598 us/iteration
Output for 5.4.1
0.48352384567261 us/iteration
Output for 5.4.0
0.39622592926025 us/iteration
Output for 5.3.29
0.5922679901123 us/iteration
Output for 5.3.28
0.71886301040649 us/iteration
Output for 5.3.27
0.62174606323242 us/iteration
Output for 5.3.26
0.64056921005249 us/iteration
Output for 5.3.25
0.63495516777039 us/iteration
Output for 5.3.24
0.66616606712341 us/iteration
Output for 5.3.23
0.62794613838196 us/iteration
Output for 5.3.22
0.58547210693359 us/iteration
Output for 5.3.21
0.56800699234009 us/iteration
Output for 5.3.20
0.62406921386719 us/iteration
Output for 5.3.19
0.64785599708557 us/iteration
Output for 5.3.18
0.71242809295654 us/iteration
Output for 5.3.17
0.60193419456482 us/iteration
Output for 5.3.16
0.6613450050354 us/iteration
Output for 5.3.15
0.56193518638611 us/iteration
Output for 5.3.14
0.54973816871643 us/iteration
Output for 5.3.13
0.67642903327942 us/iteration
Output for 5.3.12
0.65230321884155 us/iteration
Output for 5.3.11
0.72977209091187 us/iteration
Output for 5.3.10
0.57432413101196 us/iteration
Output for 5.3.9
0.62332010269165 us/iteration
Output for 5.3.8
0.6414270401001 us/iteration
Output for 5.3.7
0.56225204467773 us/iteration
Output for 5.3.6
0.68963599205017 us/iteration
Output for 5.3.5
0.61185717582703 us/iteration
Output for 5.3.4
0.67487907409668 us/iteration
Output for 5.3.3
0.64905214309692 us/iteration
Output for 5.3.2
0.57437801361084 us/iteration
Output for 5.3.1
0.57971000671387 us/iteration
Output for 5.3.0
0.54908919334412 us/iteration
Output for 5.2.17
0.69205808639526 us/iteration
Output for 5.2.16
0.70186901092529 us/iteration
Output for 5.2.15
0.72351002693176 us/iteration
Output for 5.2.14
0.6126229763031 us/iteration
Output for 5.2.13
0.56245994567871 us/iteration
Output for 5.2.12
0.62051486968994 us/iteration
Output for 5.2.11
0.63483095169067 us/iteration
Output for 5.2.10
0.69848704338074 us/iteration
Output for 5.2.9
0.62669110298157 us/iteration
Output for 5.2.8
0.57143020629883 us/iteration
Output for 5.2.7
0.64029598236084 us/iteration
Output for 5.2.6
0.6485481262207 us/iteration
Output for 5.2.5
0.71767997741699 us/iteration
Output for 5.2.4
0.63160014152527 us/iteration
Output for 5.2.3
0.73088216781616 us/iteration
Output for 5.2.2
0.6085159778595 us/iteration
Output for 5.2.1
0.71158599853516 us/iteration
Output for 5.2.0
0.72756886482239 us/iteration
Output for 5.1.6
0.68185615539551 us/iteration
Output for 5.1.5
0.75747108459473 us/iteration
Output for 5.1.4
0.76187491416931 us/iteration
Output for 5.1.3
0.74796080589294 us/iteration
Output for 5.1.2
0.74390292167664 us/iteration
Output for 5.1.1
0.74936103820801 us/iteration
Output for 5.1.0
0.7674388885498 us/iteration
Output for 5.0.0 - 5.0.5
Fatal error: Class 'RuntimeException' not found in /in/oZrQb on line 29
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/oZrQb on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/oZrQb on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/oZrQb on line 21
Process exited with code 255.

preferences:
59.19 ms | 829 KiB | 5 Q