3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace yii\db; class test { function formName1() { $class = get_class($this); $pos = strrpos($class, '\\'); return $pos === false ? $class : substr($class, $pos + 1); } function formName2() { $reflector = new \ReflectionClass($this); return $reflector->getShortName(); } } $test = new test; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $test->formName1(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $test->formName2(); } echo (microtime(true) - $start);

Abusive script

This script was stopped while abusing our resources

Output for 7.4.1
0.27141404151917 0.28402495384216
Output for 7.4.0
0.37540698051453 0.40741395950317
Output for 7.3.13
0.39392805099487 0.49749398231506
Output for 7.3.12
0.38368201255798 0.45845508575439
Output for 7.3.11
0.38979482650757 0.49001002311707
Output for 7.3.10
0.27416801452637 0.3361439704895
Output for 7.3.9
0.29648303985596 0.3253231048584
Output for 7.3.8
0.37164878845215 0.34532189369202
Output for 7.3.7
0.3834969997406 0.38197708129883
Output for 7.3.6
0.37961196899414 0.44514608383179
Output for 7.3.5
0.37384486198425 0.46505522727966
Output for 7.3.4
0.26641488075256 0.33140015602112
Output for 7.3.3
0.34982800483704 0.48212718963623
Output for 7.3.2
0.35373616218567 0.33985614776611
Output for 7.3.1
0.26301503181458 0.32729196548462
Output for 7.3.0
0.24741005897522 0.32658410072327
Output for 7.2.26
0.42031502723694 0.552973985672
Output for 7.2.25
0.41993498802185 0.5569019317627
Output for 7.2.24
0.29900693893433 0.42451906204224
Output for 7.2.23
0.38593912124634 0.59325695037842
Output for 7.2.22
0.29045009613037 0.41322803497314
Output for 7.2.21
0.32058906555176 0.59962296485901
Output for 7.2.20
0.31261491775513 0.43433403968811
Output for 7.2.19
0.39181804656982 0.61780905723572
Output for 7.2.18
0.4060959815979 0.52973198890686
Output for 7.2.17
0.3268940448761 0.48059797286987
Output for 7.2.16
0.40605306625366 0.53887796401978
Output for 7.2.15
0.25500893592834 0.37603402137756
Output for 7.2.14
0.35056209564209 0.46915602684021
Output for 7.2.13
0.34851813316345 0.59500217437744
Output for 7.2.12
0.37968301773071 0.60085701942444
Output for 7.2.11
0.39934897422791 0.50412607192993
Output for 7.2.10
0.39714908599854 0.40368509292603
Output for 7.2.9
0.34785199165344 0.41471600532532
Output for 7.2.8
0.33805584907532 0.42614102363586
Output for 7.2.7
0.39822602272034 0.59342002868652
Output for 7.2.6
0.40025591850281 0.60170197486877
Output for 7.2.5
0.28774499893188 0.41565108299255
Output for 7.2.4
0.31636095046997 0.59874701499939
Output for 7.2.3
0.39471483230591 0.54117608070374
Output for 7.2.2
0.25338506698608 0.3789529800415
Output for 7.2.1
0.35944604873657 0.58414793014526
Output for 7.2.0
0.39774703979492 0.56290984153748
Output for 7.1.33
0.38588905334473 0.65863800048828
Output for 7.1.32
0.54883599281311 0.58850288391113
Output for 7.1.31
0.40866708755493 0.7261049747467
Output for 7.1.30
0.42129707336426 0.75772285461426
Output for 7.1.29
0.41173577308655 0.52137494087219
Output for 7.1.28
0.41406011581421 0.56918787956238
Output for 7.1.27
0.43297910690308 0.62732887268066
Output for 7.1.26
0.51691198348999 0.52301502227783
Output for 7.1.25
0.41767501831055 0.52046704292297
Output for 7.1.24
0.54066610336304 0.6808500289917
Output for 7.1.23
0.54705309867859 0.73685598373413
Output for 7.1.22
0.415198802948 0.54637598991394
Output for 7.1.21
0.54489398002625 0.55358505249023
Output for 7.1.20
0.48840379714966 0.52467894554138
Output for 7.1.19
0.50680303573608 0.74537992477417
Output for 7.1.18
0.40568280220032 0.51373410224915
Output for 7.1.17
0.42012000083923 0.51021003723145
Output for 7.1.16
0.55207705497742 0.7787389755249
Output for 7.1.15
0.40772604942322 0.52325296401978
Output for 7.1.14
0.54504704475403 0.70104193687439
Output for 7.1.13
0.55456900596619 0.7082040309906
Output for 7.1.12
0.51006388664246 0.74356484413147
Output for 7.1.11
0.48217582702637 0.6503541469574
Output for 7.1.10
0.42634916305542 0.6240541934967
Output for 7.1.9
0.53087592124939 0.57392191886902
Output for 7.1.8
0.52925705909729 0.80802702903748
Output for 7.1.7
0.54358911514282 0.71502995491028
Output for 7.1.6
0.46815586090088 0.51818799972534
Output for 7.1.5
0.40694212913513 0.5894250869751
Output for 7.1.4
0.45930218696594 0.75769400596619
Output for 7.1.3
0.49377202987671 0.75949311256409
Output for 7.1.2
0.54214310646057 0.65812993049622
Output for 7.1.1
0.47121095657349 0.68823099136353
Output for 7.1.0
0.49971199035645 0.76024198532104
Output for 7.0.33
0.50762510299683 0.74728989601135
Output for 7.0.32
0.51044797897339 0.57945084571838
Output for 7.0.31
0.50596213340759 0.73479914665222
Output for 7.0.30
0.38985300064087 0.50897097587585
Output for 7.0.29
0.56256580352783 0.77086710929871
Output for 7.0.28
0.46290302276611 0.63447093963623
Output for 7.0.27
0.47386384010315 0.55419611930847
Output for 7.0.26
0.40648198127747 0.76937198638916
Output for 7.0.25
0.54204797744751 0.62030005455017
Output for 7.0.24
0.54200792312622 0.58798813819885
Output for 7.0.23
0.42293906211853 0.49867701530457
Output for 7.0.22
0.49794602394104 0.78565287590027
Output for 7.0.21
0.54004979133606 0.69310307502747
Output for 7.0.20
0.40655207633972 0.5020580291748
Output for 7.0.19
0.41302013397217 0.50851392745972
Output for 7.0.18
0.5174720287323 0.71971201896667
Output for 7.0.17
0.41653680801392 0.5323600769043
Output for 7.0.16
0.54226803779602 0.70388603210449
Output for 7.0.15
0.40745997428894 0.54177117347717
Output for 7.0.14
0.4306640625 0.55411815643311
Output for 7.0.13
0.53866291046143 0.70638108253479
Output for 7.0.12
0.43945002555847 0.54857587814331
Output for 7.0.11
0.40579104423523 0.63405084609985
Output for 7.0.10
0.41334795951843 0.66386413574219
Output for 7.0.9
0.46400094032288 0.63326406478882
Output for 7.0.8
0.51617312431335 0.75448703765869
Output for 7.0.7
0.55528593063354 0.74057793617249
Output for 7.0.6
0.4079749584198 0.54415488243103
Output for 7.0.5
0.54860091209412 0.56770300865173
Output for 7.0.4
0.50920605659485 0.64705014228821
Output for 7.0.3
0.56393909454346 0.73864197731018
Output for 7.0.2
0.44404697418213 0.76169395446777
Output for 7.0.1
0.42711400985718 0.50840210914612
Output for 7.0.0
0.53900408744812 0.73765015602112
Output for 5.6.40
1.0935070514679
Process exited with code 137.
Output for 5.6.39
1.2894859313965 1.000999212265
Output for 5.6.38
1.1511840820312
Process exited with code 137.
Output for 5.6.37
1.3312969207764
Process exited with code 137.
Output for 5.6.36
1.0168089866638 1.1843709945679
Output for 5.6.35
1.1577718257904 1.0051369667053
Output for 5.6.34
1.2095129489899 1.1548280715942
Output for 5.6.33
0.96327996253967 1.0288679599762
Output for 5.6.32
1.2758550643921
Process exited with code 137.
Output for 5.6.31
1.2823050022125 1.0890350341797
Output for 5.6.30
0.95226693153381 0.94105911254883
Output for 5.6.29
1.2344529628754
Process exited with code 137.
Output for 5.6.28
1.2273139953613
Process exited with code 137.
Output for 5.6.27
1.3187720775604 1.1396329402924
Output for 5.6.26
1.06183385849 0.96859812736511
Output for 5.6.25
1.0818400382996 1.274973154068
Output for 5.6.24
1.3046708106995
Process exited with code 137.
Output for 5.6.23
1.2001860141754
Process exited with code 137.
Output for 5.6.22
1.0618951320648 1.0890078544617
Output for 5.6.21
1.1072278022766 1.2089710235596
Output for 5.6.20
1.2764270305634
Process exited with code 137.
Output for 5.6.19
1.3379158973694
Process exited with code 137.
Output for 5.6.18
1.0958888530731 0.96739292144775
Output for 5.6.17
1.3181910514832
Process exited with code 137.
Output for 5.6.16
1.2021701335907
Process exited with code 137.
Output for 5.6.15
1.2836511135101
Process exited with code 137.
Output for 5.6.14
1.0336971282959 1.353541135788
Output for 5.6.13
1.3497631549835 1.1239650249481
Output for 5.6.12
1.2898259162903 1.1130838394165
Output for 5.6.11
1.2327389717102 1.0383498668671
Output for 5.6.10
1.2164788246155
Process exited with code 137.
Output for 5.6.9
1.2500581741333 1.0194129943848
Output for 5.6.8
1.1750349998474
Process exited with code 137.
Output for 5.6.7
1.2451260089874
Process exited with code 137.
Output for 5.6.6
1.3251121044159 1.0335779190063
Output for 5.6.5
1.3204669952393 0.99086809158325
Output for 5.6.4
0.9790210723877 0.99252414703369
Output for 5.6.3
1.2655251026154
Process exited with code 137.
Output for 5.6.2
1.157665014267
Process exited with code 137.
Output for 5.6.1
1.3342490196228
Process exited with code 137.
Output for 5.6.0
1.2229950428009
Process exited with code 137.
Output for 5.5.38
1.0751569271088 1.3827090263367
Output for 5.5.37
1.3941669464111
Process exited with code 137.
Output for 5.5.36
1.3129689693451 0.97554302215576
Output for 5.5.35
1.0830099582672 0.92597198486328
Output for 5.5.34
1.3549811840057
Process exited with code 137.
Output for 5.5.33
1.0660109519958 0.97135901451111
Output for 5.5.32
1.3081820011139
Process exited with code 137.
Output for 5.5.31
1.1625680923462 0.96232390403748
Output for 5.5.30
0.98632884025574 1.4488370418549
Output for 5.5.29
1.1535959243774 0.97599792480469
Output for 5.5.28
1.3388161659241 0.90273880958557
Output for 5.5.27
1.3398380279541
Process exited with code 137.
Output for 5.5.26
1.3697390556335
Process exited with code 137.
Output for 5.5.25
0.91984701156616 1.4160017967224
Output for 5.5.24
1.0440309047699 0.91034197807312
Output for 5.5.23
1.0007898807526 1.0046811103821
Output for 5.5.22
1.3107731342316
Process exited with code 137.
Output for 5.5.21
1.3344910144806
Process exited with code 137.
Output for 5.5.20
1.3258061408997
Process exited with code 137.
Output for 5.5.19
1.3804471492767
Process exited with code 137.
Output for 5.5.18
1.3404660224915 1.0283949375153
Output for 5.5.17
1.2596788406372 0.97933983802795
Output for 5.5.16
1.3470859527588
Process exited with code 137.
Output for 5.5.15
1.330531835556
Process exited with code 137.
Output for 5.5.14
1.364403963089
Process exited with code 137.
Output for 5.5.13
1.2142369747162
Process exited with code 137.
Output for 5.5.12
0.99911284446716 1.0955579280853
Output for 5.5.11
1.366180896759 1.1172018051147
Output for 5.5.10
1.1812250614166
Process exited with code 137.
Output for 5.5.9
1.409576177597
Process exited with code 137.
Output for 5.5.8
1.3537809848785
Process exited with code 137.
Output for 5.5.7
0.98807287216187 0.9883348941803
Output for 5.5.6
1.3171329498291
Process exited with code 137.
Output for 5.5.5
1.3638818264008
Process exited with code 137.
Output for 5.5.4
1.353285074234 0.99578595161438
Output for 5.5.3
1.2939031124115
Process exited with code 137.
Output for 5.5.2
1.1459059715271 1.0801560878754
Output for 5.5.1
1.3364078998566
Process exited with code 137.
Output for 5.5.0
1.1612918376923
Process exited with code 137.
Output for 5.4.45
1.4192459583282
Process exited with code 137.
Output for 5.4.44
1.2748248577118 1.1351561546326
Output for 5.4.43
1.3401951789856
Process exited with code 137.
Output for 5.4.42
1.4116761684418
Process exited with code 137.
Output for 5.4.41
1.4013290405273
Process exited with code 137.
Output for 5.4.40
1.3962349891663
Process exited with code 137.
Output for 5.4.39
1.0622529983521 0.99631404876709
Output for 5.4.38
1.3328189849854
Process exited with code 137.
Output for 5.4.37
1.0726079940796 0.99841213226318
Output for 5.4.36
1.3389739990234 1.0731959342957
Output for 5.4.35
1.0302231311798 1.1494190692902
Output for 5.4.34
1.0503590106964 1.0628519058228
Output for 5.4.33
1.3648269176483
Process exited with code 137.
Output for 5.4.32
1.4031190872192
Process exited with code 137.
Output for 5.4.31
0.95346212387085 0.97545385360718
Output for 5.4.30
1.0341799259186 1.0595140457153
Output for 5.4.29
1.3517639636993 1.0386929512024
Output for 5.4.28
1.2882900238037
Process exited with code 137.
Output for 5.4.27
1.3278670310974
Process exited with code 137.
Output for 5.4.26
1.0972669124603 0.98349809646606
Output for 5.4.25
1.3658170700073
Process exited with code 137.
Output for 5.4.24
1.3347368240356
Process exited with code 137.
Output for 5.4.23
1.1064879894257 1.0555150508881
Output for 5.4.22
1.3282148838043
Process exited with code 137.
Output for 5.4.21
1.0530850887299 1.0479049682617
Output for 5.4.20
1.0039331912994 0.93768000602722
Output for 5.4.19
1.3847229480743
Process exited with code 137.
Output for 5.4.18
1.2897300720215 0.99567914009094
Output for 5.4.17
1.4007081985474
Process exited with code 137.
Output for 5.4.16
1.1602530479431 1.0184390544891
Output for 5.4.15
1.386766910553
Process exited with code 137.
Output for 5.4.14
1.0449409484863 0.9806821346283
Output for 5.4.13
1.2801010608673
Process exited with code 137.
Output for 5.4.12
1.3750059604645
Process exited with code 137.
Output for 5.4.11
1.2814090251923
Process exited with code 137.
Output for 5.4.10
1.3719518184662
Process exited with code 137.
Output for 5.4.9
1.2565171718597 1.0399441719055
Output for 5.4.8
1.4050559997559
Process exited with code 137.
Output for 5.4.7
1.146185874939 1.0688140392303
Output for 5.4.6
1.3477790355682 1.135174036026
Output for 5.4.5
1.3878788948059
Process exited with code 137.
Output for 5.4.4
1.1021440029144
Process exited with code 137.
Output for 5.4.3
1.3973340988159 1.0614051818848
Output for 5.4.2
1.2487990856171
Process exited with code 137.
Output for 5.4.1
1.387668132782
Process exited with code 137.
Output for 5.4.0
1.2909841537476 1.0018310546875
Output for 5.3.29
1.5477950572968
Process exited with code 137.
Output for 5.3.28
1.4851911067963
Process exited with code 137.
Output for 5.3.27
1.9066150188446
Process exited with code 137.
Output for 5.3.26
2.0169770717621
Process exited with code 137.
Output for 5.3.25
1.9749300479889
Process exited with code 137.
Output for 5.3.24
1.605476140976
Process exited with code 137.
Output for 5.3.23
2.0054581165314
Process exited with code 137.
Output for 5.3.22
1.6721551418304
Process exited with code 137.
Output for 5.3.21
1.6610641479492
Process exited with code 137.
Output for 5.3.20
1.757091999054
Process exited with code 137.
Output for 5.3.19
1.6017870903015
Process exited with code 137.
Output for 5.3.18
2.0125250816345
Process exited with code 137.
Output for 5.3.17
2.0228550434113
Process exited with code 137.
Output for 5.3.16
2.0492680072784
Process exited with code 137.
Output for 5.3.15
1.5793330669403
Process exited with code 137.
Output for 5.3.14
1.7161011695862
Process exited with code 137.
Output for 5.3.13
1.9096801280975
Process exited with code 137.
Output for 5.3.12
1.5115151405334
Process exited with code 137.
Output for 5.3.11
1.627669095993
Process exited with code 137.
Output for 5.3.10
1.6868650913239
Process exited with code 137.
Output for 5.3.9
2.04327917099
Process exited with code 137.
Output for 5.3.8
2.0670020580292
Process exited with code 137.
Output for 5.3.7
2.0085701942444
Process exited with code 137.
Output for 5.3.6
1.7738540172577
Process exited with code 137.
Output for 5.3.5
1.9708161354065
Process exited with code 137.
Output for 5.3.4
1.4938991069794
Process exited with code 137.
Output for 5.3.3
1.541344165802
Process exited with code 137.
Output for 5.3.2
1.8620700836182
Process exited with code 137.
Output for 5.3.1
1.82137799263
Process exited with code 137.
Output for 5.3.0
1.4183051586151
Process exited with code 137.
Output for 5.2.3 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/qbPNj on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING in <b>/in/qbPNj</b> on line <b>2</b><br />
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, 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected T_STRING in <b>/in/qbPNj</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/qbPNj</b> on line <b>2</b><br />
Process exited with code 255.

preferences:
287.09 ms | 401 KiB | 325 Q