3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { function doSomething($a) { return $a + 2; } } $start = microtime(true); $foo = new foo(); for ($i = 0; $i < 100000; $i++) { $foo->doSomething(1); } $end1 = (microtime(true) - $start); echo $end1 . PHP_EOL; $start = microtime(true); $foo = new foo(); $doSomething = new \reflectionMethod('foo', 'doSomething'); for ($i = 0; $i < 100000; $i++) { $doSomething->invoke($foo, 1); } $end2 = (microtime(true) - $start); echo $end2 . PHP_EOL; var_dump($end2 - $end1);
Output for 7.1.0
0.0053811073303223 0.01570987701416 float(0.010328769683838)
Output for 7.0.14
0.005486011505127 0.013742923736572 float(0.0082569122314453)
Output for 7.0.12
0.0055041313171387 0.021227836608887 float(0.015723705291748)
Output for 7.0.6
0.0047218799591064 0.010289907455444 float(0.0055680274963379)
Output for 7.0.5
0.0046589374542236 0.015477895736694 float(0.010818958282471)
Output for 7.0.4
0.0031919479370117 0.0078151226043701 float(0.0046231746673584)
Output for 7.0.3
0.0041530132293701 0.0090539455413818 float(0.0049009323120117)
Output for 7.0.2
0.0032470226287842 0.0080881118774414 float(0.0048410892486572)
Output for 7.0.1
0.0049970149993896 0.011816024780273 float(0.0068190097808838)
Output for 7.0.0
0.0049600601196289 0.011604070663452 float(0.0066440105438232)
Output for hhvm-3.12.0
0.014682054519653 0.085119962692261 float(0.070437908172607)
Output for hhvm-3.10.0
0.016039133071899 0.097906112670898 float(0.081866979598999)
Output for 5.6.28
0.018249988555908 0.039444923400879 float(0.021194934844971)
Output for 5.6.21
0.014802217483521 0.030673980712891 float(0.01587176322937)
Output for 5.6.20
0.013957977294922 0.029916048049927 float(0.015958070755005)
Output for 5.6.19
0.014437913894653 0.030151128768921 float(0.015713214874268)
Output for 5.6.18
0.010212898254395 0.023081064224243 float(0.012868165969849)
Output for 5.6.17
0.01078987121582 0.023755073547363 float(0.012965202331543)
Output for 5.6.16
0.010476112365723 0.023609161376953 float(0.01313304901123)
Output for 5.6.15
0.015567064285278 0.031913995742798 float(0.01634693145752)
Output for 5.6.14
0.016055822372437 0.032339811325073 float(0.016283988952637)
Output for 5.6.13
0.014649868011475 0.02933406829834 float(0.014684200286865)
Output for 5.6.12
0.016144990921021 0.03331995010376 float(0.017174959182739)
Output for 5.6.11
0.016272068023682 0.03215503692627 float(0.015882968902588)
Output for 5.6.10
0.010352849960327 0.023622989654541 float(0.013270139694214)
Output for 5.6.9
0.015665054321289 0.033013105392456 float(0.017348051071167)
Output for 5.6.8
0.012349128723145 0.025999069213867 float(0.013649940490723)
Output for 5.6.7
0.010086059570312 0.023281097412109 float(0.013195037841797)
Output for 5.5.35
0.009166955947876 0.023418188095093 float(0.014251232147217)
Output for 5.5.34
0.0096449851989746 0.022539138793945 float(0.012894153594971)
Output for 5.5.33
0.01469087600708 0.029528141021729 float(0.014837265014648)
Output for 5.5.32
0.010535001754761 0.023213863372803 float(0.012678861618042)
Output for 5.5.31
0.012376070022583 0.028124809265137 float(0.015748739242554)
Output for 5.5.30
0.012266874313354 0.026880025863647 float(0.014613151550293)
Output for 5.5.29
0.010179996490479 0.02366304397583 float(0.013483047485352)
Output for 5.5.28
0.0098378658294678 0.022556066513062 float(0.012718200683594)
Output for 5.5.27
0.016003847122192 0.028664112091064 float(0.012660264968872)
Output for 5.5.26
0.013157844543457 0.028272151947021 float(0.015114307403564)
Output for 5.5.25
0.015310049057007 0.032487154006958 float(0.017177104949951)
Output for 5.5.24
0.013607978820801 0.028272151947021 float(0.014664173126221)
Output for 5.4.45
0.0095350742340088 0.022390127182007 float(0.012855052947998)
Output for 5.4.44
0.0096850395202637 0.02279806137085 float(0.013113021850586)
Output for 5.4.43
0.0095717906951904 0.022536993026733 float(0.012965202331543)
Output for 5.4.42
0.0092220306396484 0.022270917892456 float(0.013048887252808)
Output for 5.4.41
0.0094971656799316 0.022587060928345 float(0.013089895248413)
Output for 5.4.40
0.011258125305176 0.030140161514282 float(0.018882036209106)
Output for 5.4.39
0.012691020965576 0.027517080307007 float(0.014826059341431)
Output for 5.4.38
0.015289068222046 0.032747030258179 float(0.017457962036133)
Output for 5.4.37
0.015384912490845 0.033542156219482 float(0.018157243728638)
Output for 5.4.36
0.014859914779663 0.031638145446777 float(0.016778230667114)
Output for 5.4.35
0.012315034866333 0.027175903320312 float(0.014860868453979)
Output for 5.4.34
0.0096089839935303 0.022972822189331 float(0.013363838195801)
Output for 5.4.32
0.010417938232422 0.023831129074097 float(0.013413190841675)
Output for 5.4.31
0.014904022216797 0.028807878494263 float(0.013903856277466)
Output for 5.4.30
0.012776136398315 0.028219938278198 float(0.015443801879883)
Output for 5.4.29
0.015795946121216 0.033858060836792 float(0.018062114715576)
Output for 5.4.28
0.014559984207153 0.032341957092285 float(0.017781972885132)
Output for 5.4.27
0.015062093734741 0.033240795135498 float(0.018178701400757)
Output for 5.4.26
0.01215386390686 0.027940988540649 float(0.015787124633789)
Output for 5.4.25
0.013857841491699 0.02861213684082 float(0.014754295349121)
Output for 5.4.24
0.010495901107788 0.024253129959106 float(0.013757228851318)
Output for 5.4.23
0.0094530582427979 0.023811101913452 float(0.014358043670654)
Output for 5.4.22
0.014379024505615 0.032408952713013 float(0.018029928207397)
Output for 5.4.21
0.014410972595215 0.032618045806885 float(0.01820707321167)
Output for 5.4.20
0.011980056762695 0.031970977783203 float(0.019990921020508)
Output for 5.4.19
0.012728929519653 0.024240970611572 float(0.011512041091919)
Output for 5.4.18
0.013463020324707 0.030750036239624 float(0.017287015914917)
Output for 5.4.17
0.009660005569458 0.023200988769531 float(0.013540983200073)
Output for 5.4.16
0.014974117279053 0.028563022613525 float(0.013588905334473)
Output for 5.4.15
0.015377044677734 0.032192945480347 float(0.016815900802612)
Output for 5.4.14
0.015009880065918 0.032418012619019 float(0.017408132553101)
Output for 5.4.13
0.015665054321289 0.035229921340942 float(0.019564867019653)
Output for 5.4.12
0.015167951583862 0.032364130020142 float(0.017196178436279)
Output for 5.4.11
0.015784978866577 0.033992052078247 float(0.01820707321167)
Output for 5.4.10
0.0098249912261963 0.025325059890747 float(0.015500068664551)
Output for 5.4.9
0.014970064163208 0.033015966415405 float(0.018045902252197)
Output for 5.4.8
0.0099790096282959 0.023890972137451 float(0.013911962509155)
Output for 5.4.7
0.01659893989563 0.035795927047729 float(0.0191969871521)
Output for 5.4.6
0.01445198059082 0.030424118041992 float(0.015972137451172)
Output for 5.4.5
0.016028165817261 0.032747983932495 float(0.016719818115234)
Output for 5.4.4
0.016258001327515 0.033308982849121 float(0.017050981521606)
Output for 5.4.3
0.0097641944885254 0.022939920425415 float(0.01317572593689)
Output for 5.4.2
0.014691114425659 0.031681060791016 float(0.016989946365356)
Output for 5.4.1
0.014913082122803 0.032452821731567 float(0.017539739608765)
Output for 5.4.0
0.015846014022827 0.034558057785034 float(0.018712043762207)
Output for 5.3.29
0.022257089614868 0.037730932235718 float(0.01547384262085)
Output for 5.3.28
0.017210006713867 0.031580924987793 float(0.014370918273926)
Output for 5.3.27
0.017411947250366 0.030941963195801 float(0.013530015945435)
Output for 5.3.26
0.023349046707153 0.039228916168213 float(0.01587986946106)
Output for 5.3.25
0.017852783203125 0.032112836837769 float(0.014260053634644)
Output for 5.3.24
0.019860029220581 0.034106016159058 float(0.014245986938477)
Output for 5.3.23
0.024790048599243 0.041441917419434 float(0.01665186882019)
Output for 5.3.22
0.021210908889771 0.0363609790802 float(0.01515007019043)
Output for 5.3.21
0.023415088653564 0.039573907852173 float(0.016158819198608)
Output for 5.3.20
0.017458200454712 0.035367965698242 float(0.01790976524353)
Output for 5.3.19
0.017566204071045 0.031069993972778 float(0.013503789901733)
Output for 5.3.18
0.014436006546021 0.02916407585144 float(0.01472806930542)
Output for 5.3.17
0.022999048233032 0.039096117019653 float(0.016097068786621)
Output for 5.3.16
0.025152206420898 0.041136980056763 float(0.015984773635864)
Output for 5.3.15
0.022520065307617 0.038930892944336 float(0.016410827636719)
Output for 5.3.14
0.022845029830933 0.038954019546509 float(0.016108989715576)
Output for 5.3.13
0.021843910217285 0.037443161010742 float(0.015599250793457)
Output for 5.3.12
0.02390193939209 0.04047679901123 float(0.016574859619141)
Output for 5.3.11
0.022768020629883 0.039000034332275 float(0.016232013702393)
Output for 5.3.10
0.023921012878418 0.039906024932861 float(0.015985012054443)
Output for 5.3.9
0.023440837860107 0.038189888000488 float(0.014749050140381)
Output for 5.3.8
0.024521112442017 0.040747880935669 float(0.016226768493652)
Output for 5.3.7
0.023072004318237 0.038887023925781 float(0.015815019607544)
Output for 5.3.6
0.023879051208496 0.039473056793213 float(0.015594005584717)
Output for 5.3.5
0.025193929672241 0.036765098571777 float(0.011571168899536)
Output for 5.3.4
0.015206098556519 0.029190063476562 float(0.013983964920044)
Output for 5.3.3
0.021066904067993 0.033484935760498 float(0.012418031692505)
Output for 5.3.2
0.015450954437256 0.02872896194458 float(0.013278007507324)
Output for 5.3.1
0.014982938766479 0.029294967651367 float(0.014312028884888)
Output for 5.3.0
0.015203952789307 0.029261112213135 float(0.014057159423828)
Output for 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.024790048599243 0.032627105712891 float(0.0078370571136475)
Output for 5.2.16
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.034228086471558 0.039958000183105 float(0.0057299137115479)
Output for 5.2.15
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.032301187515259 0.044525861740112 float(0.012224674224854)
Output for 5.2.14
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033388137817383 0.045048952102661 float(0.011660814285278)
Output for 5.2.13
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.03032398223877 0.042567014694214 float(0.012243032455444)
Output for 5.2.12
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033243894577026 0.044661998748779 float(0.011418104171753)
Output for 5.2.11
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.032894134521484 0.043028116226196 float(0.010133981704712)
Output for 5.2.10
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.020534038543701 0.032686233520508 float(0.012152194976807)
Output for 5.2.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033569097518921 0.04103684425354 float(0.0074677467346191)
Output for 5.2.8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.027117967605591 0.038747072219849 float(0.011629104614258)
Output for 5.2.7
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.024029970169067 0.034969091415405 float(0.010939121246338)
Output for 5.2.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.031322956085205 0.040596008300781 float(0.0092730522155762)
Output for 5.2.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033559083938599 0.044752836227417 float(0.011193752288818)
Output for 5.2.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.031521081924438 0.044164896011353 float(0.012643814086914)
Output for 5.2.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.024823904037476 0.03659200668335 float(0.011768102645874)
Output for 5.2.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033854007720947 0.046020030975342 float(0.012166023254395)
Output for 5.2.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.033066987991333 0.045023918151855 float(0.011956930160522)
Output for 5.2.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.024055957794189 0.035010099411011 float(0.010954141616821)
Output for 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.025880813598633 0.036062955856323 float(0.01018214225769)
Output for 5.1.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.019958019256592 0.031560897827148 float(0.011602878570557)
Output for 5.1.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.026510953903198 0.039129972457886 float(0.012619018554688)
Output for 5.1.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.019841909408569 0.030846118927002 float(0.011004209518433)
Output for 5.1.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.028691053390503 0.035981893539429 float(0.0072908401489258)
Output for 5.1.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.019405841827393 0.029975175857544 float(0.010569334030151)
Output for 5.1.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.029971122741699 0.034764051437378 float(0.0047929286956787)
Output for 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.046442031860352 0.053915977478027 float(0.0074739456176758)
Output for 5.0.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.049948930740356 0.057013988494873 float(0.0070650577545166)
Output for 5.0.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.049994945526123 0.056092977523804 float(0.0060980319976807)
Output for 5.0.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.035705804824829 0.04529881477356 float(0.0095930099487305)
Output for 5.0.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.05582594871521PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 25 0.060790061950684PHP_EOLfloat(0.0049641132354736)
Output for 5.0.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.059278011322021PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 25 0.060518026351929PHP_EOLfloat(0.0012400150299072)
Output for 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.048324 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.061056 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.7
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.044999 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.047723 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.063285 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.056782 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.040697 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.042334 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.055119 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.4.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.057559 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.11
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.0354 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.10
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 0.054708 Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.065992PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.04074PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.7
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.058039PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.045271PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.058145PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.042918PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.063293PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.0593PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Process exited with code 255.
Output for 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.064315PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19
Output for 4.3.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/feTtO on line 19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/feTtO on line 15 0.034367PHP_EOL Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/feTtO on line 19