3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { get_class($foo); } echo (microtime(true) - $start); echo "\n"; $name = (new ReflectionClass($foo))->getName(); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $name; } echo (microtime(true) - $start);
Output for 7.1.0
0.038635015487671 0.0076370239257812
Output for 7.0.14
0.073451042175293 0.025475025177002
Output for 7.0.12
0.058174133300781 0.010725021362305
Output for 7.0.6
0.037288904190063 0.0077521800994873
Output for 7.0.5
0.052561044692993 0.0098321437835693
Output for 7.0.4
0.052152872085571 0.0088989734649658
Output for 7.0.3
0.048321962356567 0.007655143737793
Output for 7.0.2
0.048653125762939 0.0087428092956543
Output for 7.0.1
0.040625095367432 0.0076160430908203
Output for 7.0.0
0.047076940536499 0.0084578990936279
Output for 5.6.28
0.16129899024963 0.021748065948486
Output for 5.6.21
0.11478686332703 0.021608114242554
Output for 5.6.20
0.11890602111816 0.021389007568359
Output for 5.6.19
0.12448692321777 0.021960973739624
Output for 5.6.18
0.10602402687073 0.021883010864258
Output for 5.6.17
0.10235190391541 0.020826101303101
Output for 5.6.16
0.11000990867615 0.023644208908081
Output for 5.6.15
0.11292600631714 0.021672964096069
Output for 5.6.14
0.1016480922699 0.02167797088623
Output for 5.6.13
0.097620964050293 0.021589994430542
Output for 5.6.12
0.12393307685852 0.021425008773804
Output for 5.6.11
0.1228609085083 0.021453142166138
Output for 5.6.10
0.12444305419922 0.025038957595825
Output for 5.6.9
0.10096001625061 0.021606922149658
Output for 5.6.8
0.12681293487549 0.021980047225952
Output for 5.5.35
0.12627196311951 0.02139687538147
Output for 5.5.34
0.10018110275269 0.020978927612305
Output for 5.5.33
0.10446405410767 0.025075197219849
Output for 5.5.32
0.11974000930786 0.021536111831665
Output for 5.5.31
0.10354995727539 0.020950078964233
Output for 5.5.30
0.11417293548584 0.021445989608765
Output for 5.5.29
0.10329389572144 0.021887063980103
Output for 5.5.28
0.11493301391602 0.021733999252319
Output for 5.5.27
0.11819195747375 0.021736860275269
Output for 5.5.26
0.10618710517883 0.022893190383911
Output for 5.5.25
0.12072086334229 0.021464824676514
Output for 5.5.24
0.083132982254028 0.018324851989746
Output for 5.4.45
0.10243892669678 0.023366928100586
Output for 5.4.44
0.10396504402161 0.024868011474609
Output for 5.4.43
0.114590883255 0.02326512336731
Output for 5.4.42
0.10729908943176 0.023378849029541
Output for 5.4.41
0.11192083358765 0.028970003128052
Output for 5.4.40
0.12189698219299 0.023290872573853
Output for 5.4.39
0.12159299850464 0.02337908744812
Output for 5.4.38
0.11538815498352 0.023237943649292
Output for 5.4.37
0.12032389640808 0.02676796913147
Output for 5.4.36
0.11358904838562 0.022830009460449
Output for 5.4.35
0.1171441078186 0.028339147567749
Output for 5.4.34
0.11474800109863 0.023308038711548
Output for 5.4.32
0.12548017501831 0.023382186889648
Output for 5.4.31
0.10794496536255 0.023560047149658
Output for 5.4.30
0.11501097679138 0.023250102996826
Output for 5.4.29
0.103600025177 0.023065090179443
Output for 5.4.28
0.12106704711914 0.025064945220947
Output for 5.4.27
0.10203790664673 0.023262977600098
Output for 5.4.26
0.10103893280029 0.02328896522522
Output for 5.4.25
0.11309289932251 0.023326873779297
Output for 5.4.24
0.1054790019989 0.023274898529053
Output for 5.4.23
0.10536098480225 0.023276805877686
Output for 5.4.22
0.10865688323975 0.023483037948608
Output for 5.4.21
0.10337996482849 0.023282051086426
Output for 5.4.20
0.12719798088074 0.02326488494873
Output for 5.4.19
0.11875200271606 0.023516178131104
Output for 5.4.18
0.1031219959259 0.023232221603394
Output for 5.4.17
0.12557601928711 0.023261070251465
Output for 5.4.16
0.12438583374023 0.023354053497314
Output for 5.4.15
0.1020359992981 0.023241996765137
Output for 5.4.14
0.11640405654907 0.023170948028564
Output for 5.4.13
0.15458011627197 0.028039932250977
Output for 5.4.12
0.10523986816406 0.027539014816284
Output for 5.4.11
0.11242914199829 0.025859117507935
Output for 5.4.10
0.10979914665222 0.024775981903076
Output for 5.4.9
0.11799907684326 0.023262023925781
Output for 5.4.8
0.12807416915894 0.023597002029419
Output for 5.4.7
0.1073169708252 0.023233890533447
Output for 5.4.6
0.10838913917542 0.023370027542114
Output for 5.4.5
0.12064480781555 0.024000883102417
Output for 5.4.4
0.12344884872437 0.023494005203247
Output for 5.4.3
0.10041689872742 0.023409128189087
Output for 5.4.2
0.10080981254578 0.023259878158569
Output for 5.4.1
0.099381923675537 0.023200988769531
Output for 5.4.0
0.12098503112793 0.025699853897095
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/Qm3bf on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/Qm3bf on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Qm3bf on line 16
Process exited with code 255.