3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SomeObj { public function doTest() {} } $someObj = new SomeObj; class SomeClass { public static function doTest() {;} } // bench static method $starttime = microtime(true); for ($i = 0; $i< 100000; $i++) SomeClass::doTest($i); echo "Static Time: " , (microtime(true)-$starttime) , " ms\n"; // bench object method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) $someObj->doTest($i); echo "Object Time: " , (microtime(true)-$starttime) , " ms\n";
Output for 7.2.0
Static Time: 0.0030059814453125 ms Object Time: 0.32134008407593 ms
Output for 7.1.7
Static Time: 0.0053567886352539 ms Object Time: 0.31799793243408 ms
Output for 7.1.6
Static Time: 0.0031461715698242 ms Object Time: 0.33559417724609 ms
Output for 7.1.5
Static Time: 0.0065441131591797 ms Object Time: 0.3619270324707 ms
Output for 7.1.0
Static Time: 0.0046300888061523 ms Object Time: 0.35813903808594 ms
Output for 7.0.20
Static Time: 0.0056040287017822 ms Object Time: 0.38001108169556 ms
Output for 7.0.14
Static Time: 0.0048000812530518 ms Object Time: 0.32937598228455 ms
Output for 7.0.6
Static Time: 0.0032060146331787 ms Object Time: 0.32782006263733 ms
Output for 7.0.5
Static Time: 0.003673791885376 ms Object Time: 0.33084201812744 ms
Output for 7.0.4
Static Time: 0.0077171325683594 ms Object Time: 0.39741611480713 ms
Output for 7.0.3
Static Time: 0.0045719146728516 ms Object Time: 0.3394730091095 ms
Output for 7.0.2
Static Time: 0.0069229602813721 ms Object Time: 0.38135695457458 ms
Output for 7.0.1
Static Time: 0.0040340423583984 ms Object Time: 0.33864498138428 ms
Output for 7.0.0
Static Time: 0.0028998851776123 ms Object Time: 0.32062005996704 ms
Output for 5.6.28
Static Time: 0.012660980224609 ms Object Time: 0.0095469951629639 ms
Output for 5.6.21
Static Time: 0.0077090263366699 ms Object Time: 0.95492100715637 ms
Output for 5.6.20
Static Time: 0.0091679096221924 ms Object Time: 0.82581686973572 ms
Output for 5.6.19
Static Time: 0.010057926177979 ms Object Time: 0.8261501789093 ms
Output for 5.6.18
Static Time: 0.0066590309143066 ms Object Time: 0.82982897758484 ms
Output for 5.6.17
Static Time: 0.006788969039917 ms Object Time: 0.80909299850464 ms
Output for 5.6.16
Static Time: 0.010145902633667 ms Object Time: 0.85850405693054 ms
Output for 5.6.15
Static Time: 0.011844873428345 ms Object Time: 0.81647396087646 ms
Output for 5.6.14
Static Time: 0.0068559646606445 ms Object Time: 0.82668209075928 ms
Output for 5.6.13
Static Time: 0.0066719055175781 ms Object Time: 0.81998085975647 ms
Output for 5.6.12
Static Time: 0.0062921047210693 ms Object Time: 0.79390096664429 ms
Output for 5.6.11
Static Time: 0.0091838836669922 ms Object Time: 0.83916807174683 ms
Output for 5.6.10
Static Time: 0.010897159576416 ms Object Time: 0.89259505271912 ms
Output for 5.6.9
Static Time: 0.0096609592437744 ms Object Time: 0.8466260433197 ms
Output for 5.6.8
Static Time: 0.0088210105895996 ms Object Time: 0.87759399414062 ms
Output for 5.6.7
Static Time: 0.010300874710083 ms Object Time: 0.8877911567688 ms
Output for 5.5.35
Static Time: 0.009023904800415 ms Object Time: 0.84770488739014 ms
Output for 5.5.34
Static Time: 0.0083131790161133 ms Object Time: 1.0824201107025 ms
Output for 5.5.33
Static Time: 0.0083498954772949 ms Object Time: 0.81965398788452 ms
Output for 5.5.32
Static Time: 0.0092079639434814 ms Object Time: 0.82342910766602 ms
Output for 5.5.31
Static Time: 0.0095629692077637 ms Object Time: 0.8507251739502 ms
Output for 5.5.30
Static Time: 0.0096249580383301 ms Object Time: 0.82985401153564 ms
Output for 5.5.29
Static Time: 0.0068359375 ms Object Time: 0.8012580871582 ms
Output for 5.5.28
Static Time: 0.0093331336975098 ms Object Time: 0.82275795936584 ms
Output for 5.5.27
Static Time: 0.006443977355957 ms Object Time: 0.82192301750183 ms
Output for 5.5.26
Static Time: 0.0062811374664307 ms Object Time: 0.84548401832581 ms
Output for 5.5.25
Static Time: 0.0068190097808838 ms Object Time: 0.80319714546204 ms
Output for 5.5.24
Static Time: 0.0072228908538818 ms Object Time: 0.8345308303833 ms
Output for 5.4.45
Static Time: 0.0088391304016113 ms Object Time: 1.2298650741577 ms
Output for 5.4.44
Static Time: 0.0087110996246338 ms Object Time: 1.2728509902954 ms
Output for 5.4.43
Static Time: 0.0094630718231201 ms Object Time: 1.6334278583527 ms
Output for 5.4.42
Static Time: 0.011079072952271 ms Object Time: 1.5431950092316 ms
Output for 5.4.41
Static Time: 0.0096871852874756 ms Object Time: 1.7709591388702 ms
Output for 5.4.40
Static Time: 0.0095031261444092 ms Object Time: 1.1742899417877 ms
Output for 5.4.39
Static Time: 0.0097479820251465 ms Object Time: 1.4551169872284 ms
Output for 5.4.38
Static Time: 0.0090110301971436 ms Object Time: 1.2388730049133 ms
Output for 5.4.37
Static Time: 0.0088479518890381 ms Object Time: 1.7511329650879 ms
Output for 5.4.36
Static Time: 0.012467861175537 ms Object Time: 1.2765321731567 ms
Output for 5.4.35
Static Time: 0.0065500736236572 ms Object Time: 0.95116782188416 ms
Output for 5.4.34
Static Time: 0.0088250637054443 ms Object Time: 0.94846510887146 ms
Output for 5.4.32
Static Time: 0.0066299438476562 ms Object Time: 0.85477805137634 ms
Output for 5.4.31
Static Time: 0.0065019130706787 ms Object Time: 1.0040049552917 ms
Output for 5.4.30
Static Time: 0.0064120292663574 ms Object Time: 0.83725214004517 ms
Output for 5.4.29
Static Time: 0.0086178779602051 ms Object Time: 1.2631998062134 ms
Output for 5.4.28
Static Time: 0.0067429542541504 ms Object Time: 1.0253140926361 ms
Output for 5.4.27
Static Time: 0.0071990489959717 ms Object Time: 0.89813208580017 ms
Output for 5.4.26
Static Time: 0.0087730884552002 ms Object Time: 1.2075500488281 ms
Output for 5.4.25
Static Time: 0.010605096817017 ms Object Time: 1.2284169197083 ms
Output for 5.4.24
Static Time: 0.0098400115966797 ms Object Time: 1.2970612049103 ms
Output for 5.4.23
Static Time: 0.011389970779419 ms Object Time: 1.3089139461517 ms
Output for 5.4.22
Static Time: 0.0090699195861816 ms Object Time: 1.2100110054016 ms
Output for 5.4.21
Static Time: 0.009207010269165 ms Object Time: 1.1926710605621 ms
Output for 5.4.20
Static Time: 0.0093371868133545 ms Object Time: 1.4631161689758 ms
Output for 5.4.19
Static Time: 0.010528087615967 ms Object Time: 1.2488000392914 ms
Output for 5.4.18
Static Time: 0.015449047088623 ms Object Time: 1.7261991500854 ms
Output for 5.4.17
Static Time: 0.0097079277038574 ms Object Time: 1.2473261356354 ms
Output for 5.4.16
Static Time: 0.01035213470459 ms Object Time: 1.2540769577026 ms
Output for 5.4.15
Static Time: 0.009537935256958 ms Object Time: 1.2348670959473 ms
Output for 5.4.14
Static Time: 0.0090420246124268 ms Object Time: 1.2005150318146 ms
Output for 5.4.13
Static Time: 0.0095648765563965 ms Object Time: 1.1527948379517 ms
Output for 5.4.12
Could not open input file: /in/EXN1a
Process exited with code 1.
Output for 5.4.11
Static Time: 0.0093259811401367 ms Object Time: 1.3729908466339 ms
Output for 5.4.10
Static Time: 0.016666889190674 ms Object Time: 1.2298440933228 ms
Output for 5.4.9
Static Time: 0.010799169540405 ms Object Time: 1.4802100658417 ms
Output for 5.4.8
Static Time: 0.010540008544922 ms Object Time: 1.2589509487152 ms
Output for 5.4.7
Static Time: 0.017380952835083 ms Object Time: 1.3833611011505 ms
Output for 5.4.6
Static Time: 0.0094058513641357 ms Object Time: 1.687824010849 ms
Output for 5.4.5
Static Time: 0.013530015945435 ms Object Time: 1.3999788761139 ms
Output for 5.4.4
Static Time: 0.0096571445465088 ms Object Time: 1.4433588981628 ms
Output for 5.4.3
Static Time: 0.031723022460938 ms Object Time: 1.3020620346069 ms
Output for 5.4.2
Static Time: 0.009335994720459 ms Object Time: 1.4622750282288 ms
Output for 5.4.1
Static Time: 0.010134935379028 ms Object Time: 1.3130390644073 ms
Output for 5.4.0
Static Time: 0.012953996658325 ms Object Time: 1.4735147953033 ms
Output for 5.3.29
Static Time: 0.015429019927979 ms Object Time: 1.3433740139008 ms
Output for 5.3.28
Static Time: 0.021550893783569 ms Object Time: 2.0918619632721 ms
Output for 5.3.27
Static Time: 0.019788980484009 ms
Process exited with code 137.
Output for 5.3.26
Static Time: 0.020220994949341 ms Object Time: 1.9221348762512 ms
Output for 5.3.25
Static Time: 0.020725965499878 ms Object Time: 2.1676540374756 ms
Output for 5.3.24
Static Time: 0.020681142807007 ms Object Time: 1.8650560379028 ms
Output for 5.3.23
Static Time: 0.0207200050354 ms Object Time: 1.9566178321838 ms
Output for 5.3.22
Static Time: 0.031737089157104 ms Object Time: 1.9465489387512 ms
Output for 5.3.21
Static Time: 0.021935224533081 ms Object Time: 1.998486995697 ms
Output for 5.3.20
Static Time: 0.019857168197632 ms Object Time: 2.0722410678864 ms
Output for 5.3.19
Static Time: 0.020872831344604 ms Object Time: 2.0087850093842 ms
Output for 5.3.18
Static Time: 0.020762920379639 ms Object Time: 2.116464138031 ms
Output for 5.3.17
Static Time: 0.020726919174194 ms Object Time: 2.0387260913849 ms
Output for 5.3.16
Static Time: 0.021263122558594 ms Object Time: 2.1722588539124 ms
Output for 5.3.15
Static Time: 0.021886825561523 ms Object Time: 2.1960859298706 ms
Output for 5.3.14
Static Time: 0.021538972854614 ms Object Time: 2.0944530963898 ms
Output for 5.3.13
Static Time: 0.039434909820557 ms
Process exited with code 137.
Output for 5.3.12
Static Time: 0.045922040939331 ms
Process exited with code 137.
Output for 5.3.11
Static Time: 0.020884037017822 ms Object Time: 1.9736928939819 ms
Output for 5.3.10
Static Time: 0.022475957870483 ms Object Time: 1.9951100349426 ms
Output for 5.3.9
Static Time: 0.020617961883545 ms Object Time: 2.0093529224396 ms
Output for 5.3.8
Static Time: 0.021785974502563 ms Object Time: 2.0132050514221 ms
Output for 5.3.7
Static Time: 0.021959066390991 ms Object Time: 2.0713319778442 ms
Output for 5.3.6
Static Time: 0.022704839706421 ms Object Time: 2.0685951709747 ms
Output for 5.3.5
Static Time: 0.023043155670166 ms
Process exited with code 137.
Output for 5.3.4
Static Time: 0.0209059715271 ms Object Time: 2.3115630149841 ms
Output for 5.3.3
Static Time: 0.021951913833618 ms
Process exited with code 137.
Output for 5.3.2
Static Time: 0.022053956985474 ms Object Time: 1.9965078830719 ms
Output for 5.3.1
Static Time: 0.02334189414978 ms Object Time: 2.0921669006348 ms
Output for 5.3.0
Static Time: 0.042304992675781 ms Object Time: 2.3627259731293 ms
Output for 5.2.17
Static Time: 0.026132822036743 ms
Process exited with code 137.
Output for 5.2.16
Static Time: 0.026870012283325 ms
Process exited with code 137.
Output for 5.2.15
Static Time: 0.057259082794189 ms
Process exited with code 137.
Output for 5.2.14
Static Time: 0.038005828857422 ms
Process exited with code 137.
Output for 5.2.13
Static Time: 0.027757883071899 ms
Process exited with code 137.
Output for 5.2.12
Static Time: 0.025918006896973 ms
Process exited with code 137.
Output for 5.2.11
Static Time: 0.045768022537231 ms
Process exited with code 137.
Output for 5.2.10
Static Time: 0.026673078536987 ms
Process exited with code 137.
Output for 5.2.9
Static Time: 0.047619819641113 ms
Process exited with code 137.
Output for 5.2.8
Static Time: 0.06336498260498 ms
Process exited with code 137.
Output for 5.2.7
Static Time: 0.026760101318359 ms
Process exited with code 137.
Output for 5.2.6
Static Time: 0.025487899780273 ms
Process exited with code 137.
Output for 5.2.5
Static Time: 0.024826049804688 ms
Process exited with code 137.
Output for 5.2.4
Static Time: 0.044955968856812 ms
Process exited with code 137.
Output for 5.2.3
Static Time: 0.049314975738525 ms
Process exited with code 137.
Output for 5.2.2
Static Time: 0.02567195892334 ms
Process exited with code 137.
Output for 5.2.1
Static Time: 0.02126407623291 ms Object Time: 2.3379349708557 ms
Output for 5.2.0
Static Time: 0.02833890914917 ms
Process exited with code 137.
Output for 5.1.6
Static Time: 0.022675037384033 ms Object Time: 2.4024109840393 ms
Output for 5.1.5
Static Time: 0.022794961929321 ms
Process exited with code 137.
Output for 5.1.4
Static Time: 0.022675037384033 ms
Process exited with code 137.
Output for 5.1.3
Static Time: 0.034548044204712 ms
Process exited with code 137.
Output for 5.1.2
Static Time: 0.033077001571655 ms
Process exited with code 137.
Output for 5.1.1
Static Time: 0.027662038803101 ms
Process exited with code 137.
Output for 5.1.0
Static Time: 0.024329900741577 ms Object Time: 2.3770909309387 ms
Output for 5.0.5
Static Time: 0.072829961776733 ms
Process exited with code 137.
Output for 5.0.4
Static Time: 0.036574125289917 ms
Process exited with code 137.
Output for 5.0.3
Static Time: 0.03816294670105 ms
Process exited with code 137.
Output for 5.0.2
Static Time: 0.062652111053467 ms
Process exited with code 137.
Output for 5.0.1
Static Time: 0.035184860229492 ms
Process exited with code 137.
Output for 5.0.0
Static Time: 0.04248309135437 ms
Process exited with code 137.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/EXN1a on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/EXN1a on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/EXN1a on line 5
Process exited with code 255.