3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { protected $dir; public function __construct() { $this->dir = __DIR__; } function aaa() { $t = microtime(true); for ($i = 0; $i < 100000; $i++) { $this->dir; } echo microtime(true) - $t; } } $a = new A(); $a->aaa();
Output for 7.1.0
0.0023288726806641
Output for 7.0.14
0.0022299289703369
Output for 7.0.7
0.0021038055419922
Output for 7.0.6
0.0022749900817871
Output for 7.0.5
0.0023250579833984
Output for 7.0.4
0.0015208721160889
Output for 7.0.3
0.0021219253540039
Output for 7.0.2
0.0016040802001953
Output for 7.0.1
0.0013189315795898
Output for 7.0.0
0.0019681453704834
Output for 5.6.28
0.0077919960021973
Output for 5.6.22
0.005159854888916
Output for 5.6.21
0.0057370662689209
Output for 5.6.20
0.0043261051177979
Output for 5.6.19
0.0052258968353271
Output for 5.6.18
0.0052139759063721
Output for 5.4.40, 5.6.17
0.0055510997772217
Output for 5.6.16
0.0055239200592041
Output for 5.6.15
0.0054929256439209
Output for 5.6.14
0.0049049854278564
Output for 5.6.13
0.0047321319580078
Output for 5.6.12
0.0033550262451172
Output for 5.6.11
0.0036180019378662
Output for 5.6.10
0.0050938129425049
Output for 5.6.9
0.0047879219055176
Output for 5.6.8
0.00453782081604
Output for 5.6.7
0.0054450035095215
Output for 5.6.6
0.0052099227905273
Output for 5.6.5
0.0045669078826904
Output for 5.6.4
0.0040209293365479
Output for 5.6.3
0.0047500133514404
Output for 5.6.2
0.0061600208282471
Output for 5.6.1
0.0049691200256348
Output for 5.6.0
0.0052719116210938
Output for 5.5.36
0.0050680637359619
Output for 5.5.35
0.0041098594665527
Output for 5.5.34
0.0057940483093262
Output for 5.5.33
0.0050520896911621
Output for 5.5.32
0.0058410167694092
Output for 5.5.31
0.0043909549713135
Output for 5.5.30
0.0055580139160156
Output for 5.5.29
0.0035829544067383
Output for 5.5.28
0.0054140090942383
Output for 5.5.27
0.0054759979248047
Output for 5.5.26
0.0059399604797363
Output for 5.5.25
0.0046889781951904
Output for 5.5.24
0.005012035369873
Output for 5.5.23
0.005836009979248
Output for 5.5.22
0.0052390098571777
Output for 5.5.21
0.0061099529266357
Output for 5.5.20
0.0057690143585205
Output for 5.5.19
0.005728006362915
Output for 5.5.18
0.0055639743804932
Output for 5.5.16
0.0052940845489502
Output for 5.5.15
0.0046160221099854
Output for 5.5.14
0.0059540271759033
Output for 5.5.13
0.0058779716491699
Output for 5.5.12
0.0043301582336426
Output for 5.5.11
0.0049760341644287
Output for 5.5.10
0.0053160190582275
Output for 5.5.9
0.0049631595611572
Output for 5.5.8
0.0055232048034668
Output for 5.5.7
0.0035710334777832
Output for 5.5.6
0.0041968822479248
Output for 5.5.5
0.0048129558563232
Output for 5.5.4
0.004209041595459
Output for 5.5.3
0.0040130615234375
Output for 5.5.2
0.004331111907959
Output for 5.5.1
0.0050249099731445
Output for 5.5.0
0.0047409534454346
Output for 5.4.45
0.0048391819000244
Output for 5.4.44
0.0041770935058594
Output for 5.4.43
0.0052859783172607
Output for 5.4.42
0.0054290294647217
Output for 5.4.41
0.0056309700012207
Output for 5.4.39
0.0034711360931396
Output for 5.4.38
0.00559401512146
Output for 5.4.37
0.0060579776763916
Output for 5.4.36
0.0033621788024902
Output for 5.4.35
0.0033659934997559
Output for 5.4.34
0.0053808689117432
Output for 5.4.32
0.0057768821716309
Output for 5.4.31
0.0048930644989014
Output for 5.4.30
0.0040969848632812
Output for 5.4.29
0.0046448707580566
Output for 5.4.28
0.0059380531311035
Output for 5.4.27
0.0056140422821045
Output for 5.4.26
0.0056910514831543
Output for 5.4.25
0.0055851936340332
Output for 5.4.24
0.0035929679870605
Output for 5.4.23
0.0033960342407227
Output for 5.4.22
0.0036389827728271
Output for 5.4.21
0.0047159194946289
Output for 5.4.20
0.0042998790740967
Output for 5.4.19
0.0059378147125244
Output for 5.4.18
0.0058829784393311
Output for 5.4.17
0.0060019493103027
Output for 5.4.16
0.0055968761444092
Output for 5.4.15
0.0033750534057617
Output for 5.4.14
0.0056300163269043
Output for 5.4.13
0.0047528743743896
Output for 5.4.12
0.003460168838501
Output for 5.4.11
0.0052518844604492
Output for 5.4.10
0.0033800601959229
Output for 5.4.9
0.0028219223022461
Output for 5.4.8
0.002842903137207
Output for 5.4.7
0.0034420490264893
Output for 5.4.6
0.0036518573760986
Output for 5.4.5
0.0037119388580322
Output for 5.4.4
0.0056438446044922
Output for 5.4.3
0.0052459239959717
Output for 5.4.2
0.0033400058746338
Output for 5.4.1
0.0035240650177002
Output for 5.4.0
0.0029919147491455
Output for 5.3.29
0.0078787803649902
Output for 5.3.28
0.0095272064208984
Output for 5.3.27
0.0092899799346924
Output for 5.3.26
0.0064289569854736
Output for 5.3.25
0.0072329044342041
Output for 5.3.24
0.006662130355835
Output for 5.3.23
0.00565505027771
Output for 5.3.22
0.0053081512451172
Output for 5.3.21
0.0060069561004639
Output for 5.3.20
0.0057499408721924
Output for 5.3.19
0.0054728984832764
Output for 5.3.18
0.0054309368133545
Output for 5.3.17
0.005324125289917
Output for 5.3.16
0.0054371356964111
Output for 5.3.15
0.0073869228363037
Output for 5.3.14
0.0059199333190918
Output for 5.3.13
0.0084710121154785
Output for 5.3.12
0.0054430961608887
Output for 5.3.11
0.004802942276001
Output for 5.3.10
0.0056281089782715
Output for 5.3.9
0.005486011505127
Output for 5.3.8
0.010271072387695
Output for 5.3.7
0.011370897293091
Output for 5.3.6
0.0073349475860596
Output for 5.3.5
0.0059609413146973
Output for 5.3.4
0.004831075668335
Output for 5.3.3
0.008613109588623
Output for 5.3.2
0.0071241855621338
Output for 5.3.1
0.007112979888916
Output for 5.3.0
0.0059621334075928
Output for 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0055949687957764
Output for 5.2.16
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0069499015808105
Output for 5.2.15
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0071918964385986
Output for 5.2.14
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0069339275360107
Output for 5.2.13
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0085370540618896
Output for 5.2.12
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0067257881164551
Output for 5.2.11
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0069229602813721
Output for 5.2.10
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0066180229187012
Output for 5.2.9
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0069999694824219
Output for 5.2.8
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.006965160369873
Output for 5.2.7
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0066618919372559
Output for 5.2.6
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0066611766815186
Output for 5.2.5
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0059549808502197
Output for 5.2.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0068511962890625
Output for 5.2.3
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0067620277404785
Output for 5.2.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0090060234069824
Output for 5.2.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.011188983917236
Output for 5.2.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.012308120727539
Output for 5.1.6
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.014467000961304
Output for 5.1.5
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.012749910354614
Output for 5.1.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.013182163238525
Output for 5.1.3
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.011726140975952
Output for 5.1.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.012312173843384
Output for 5.1.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0092868804931641
Output for 5.1.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.0083777904510498
Output for 5.0.5
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.021064043045044
Output for 5.0.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.022620916366577
Output for 5.0.3
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.016273975372314
Output for 5.0.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.021701812744141
Output for 5.0.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.022375106811523
Output for 5.0.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aQHqm on line 7 0.018213033676147
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/aQHqm on line 4
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/aQHqm on line 4
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/aQHqm on line 4
Process exited with code 255.