3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $dir; public function __construct() { $this->dir = __DIR__; } function aaa() { $t = microtime(true); for ($i = 0; $i < 10000; $i++) { $this->dir; } echo microtime(true) - $t; } } $a = new A(); $a->aaa();
Output for 7.3.1
0.0002601146697998
Output for 7.3.0
0.00026679039001465
Output for 7.2.13
0.00066781044006348
Output for 7.2.12
0.00026988983154297
Output for 7.2.11
0.00057077407836914
Output for 7.2.10
0.00030612945556641
Output for 7.2.9
0.00031280517578125
Output for 7.2.4, 7.2.8
0.0002589225769043
Output for 7.2.7
0.00026082992553711
Output for 7.2.6
0.00034809112548828
Output for 7.2.5
0.00042104721069336
Output for 7.2.3
0.0003972053527832
Output for 7.2.2
0.00039315223693848
Output for 7.2.1
0.00025796890258789
Output for 7.2.0
0.00033307075500488
Output for 7.1.25
0.00098609924316406
Output for 7.1.7
0.00012803077697754
Output for 7.1.6
0.00022196769714355
Output for 7.1.5
0.00018000602722168
Output for 7.1.4
0.0003199577331543
Output for 7.1.3
0.00015902519226074
Output for 7.1.2
0.00015521049499512
Output for 7.1.1
0.00020813941955566
Output for 7.1.0
0.00016188621520996
Output for 7.0.20
0.00016903877258301
Output for 7.0.3, 7.0.19
0.00012898445129395
Output for 7.0.18
0.0001220703125
Output for 7.0.17
0.00012516975402832
Output for 7.0.16
0.00013399124145508
Output for 7.0.15
0.00025200843811035
Output for 7.0.14
0.00032782554626465
Output for 7.0.13
0.00020098686218262
Output for 7.0.12
0.00014615058898926
Output for 7.0.11
0.00022411346435547
Output for 7.0.10
0.00017189979553223
Output for 7.0.9
0.00014400482177734
Output for 7.0.8
0.00022697448730469
Output for 7.0.4, 7.0.7
0.00012707710266113
Output for 7.0.6
0.00014090538024902
Output for 7.0.5
0.00017905235290527
Output for 7.0.2
0.00030088424682617
Output for 7.0.1
0.00022101402282715
Output for 7.0.0
0.00029492378234863
Output for 5.6.30
0.00047612190246582
Output for 5.4.2, 5.5.20, 5.5.28, 5.5.32, 5.6.29
0.0003349781036377
Output for 5.6.28
0.00046610832214355
Output for 5.6.27
0.00054001808166504
Output for 5.5.24, 5.6.13, 5.6.16, 5.6.26
0.00032496452331543
Output for 5.6.25
0.00090599060058594
Output for 5.4.29, 5.5.21, 5.6.24
0.00032997131347656
Output for 5.6.18, 5.6.23
0.00036001205444336
Output for 5.4.13, 5.5.9, 5.5.19, 5.6.2, 5.6.22
0.00032591819763184
Output for 5.4.15, 5.6.21
0.00032901763916016
Output for 5.4.16, 5.6.20
0.00040602684020996
Output for 5.6.19
0.00054383277893066
Output for 5.6.17
0.00040912628173828
Output for 5.4.21, 5.5.36, 5.6.15
0.00034689903259277
Output for 5.6.14
0.00033187866210938
Output for 5.6.12
0.00041794776916504
Output for 5.5.31, 5.6.11
0.00051999092102051
Output for 5.4.24, 5.6.10
0.00034713745117188
Output for 5.6.9
0.00034093856811523
Output for 5.6.8
0.00031709671020508
Output for 5.6.7
0.00035810470581055
Output for 5.6.6
0.00046801567077637
Output for 5.4.5, 5.6.5
0.00034189224243164
Output for 5.6.4
0.00036311149597168
Output for 5.6.3
0.00033688545227051
Output for 5.6.1
0.00031495094299316
Output for 5.6.0
0.00037503242492676
Output for 5.5.38
0.00033712387084961
Output for 5.4.0, 5.5.14, 5.5.37
0.00034213066101074
Output for 5.5.35
0.00033998489379883
Output for 5.5.34
0.00034403800964355
Output for 5.5.33
0.00045299530029297
Output for 5.5.30
0.0005640983581543
Output for 5.5.29
0.00036907196044922
Output for 5.4.30, 5.4.42, 5.5.26 - 5.5.27
0.00037097930908203
Output for 5.5.25
0.0004727840423584
Output for 5.4.20, 5.5.23
0.00038313865661621
Output for 5.5.22
0.0004570484161377
Output for 5.5.18
0.00035715103149414
Output for 5.5.16
0.00037121772766113
Output for 5.5.15
0.00035405158996582
Output for 5.5.13
0.00036811828613281
Output for 5.5.12
0.00033211708068848
Output for 5.5.11
0.00037813186645508
Output for 5.5.10
0.00078701972961426
Output for 5.5.8
0.00045013427734375
Output for 5.5.7
0.00054502487182617
Output for 5.5.6
0.00042009353637695
Output for 5.5.5
0.00038003921508789
Output for 5.3.6, 5.5.4
0.00056004524230957
Output for 5.4.31 - 5.4.32, 5.5.3
0.00034904479980469
Output for 5.5.2
0.00038909912109375
Output for 5.5.1
0.00051784515380859
Output for 5.4.41, 5.5.0
0.00032711029052734
Output for 5.4.45
0.00055193901062012
Output for 5.4.14, 5.4.44
0.00033807754516602
Output for 5.4.43
0.00032615661621094
Output for 5.4.40
0.00039482116699219
Output for 5.4.39
0.00033879280090332
Output for 5.4.35, 5.4.37 - 5.4.38
0.00033903121948242
Output for 5.4.36
0.00080704689025879
Output for 5.3.5, 5.4.34
0.00055813789367676
Output for 5.4.28
0.00035500526428223
Output for 5.4.27
0.00077390670776367
Output for 5.4.26
0.00046110153198242
Output for 5.4.25
0.00036191940307617
Output for 5.4.23
0.00034284591674805
Output for 5.4.22
0.00035190582275391
Output for 5.4.19
0.00042390823364258
Output for 5.4.18
0.00034308433532715
Output for 5.4.3, 5.4.17
0.00033402442932129
Output for 5.4.12
0.00035905838012695
Output for 5.4.11
0.00032401084899902
Output for 5.4.10
0.00060701370239258
Output for 5.4.9
0.0003669261932373
Output for 5.4.8
0.00041699409484863
Output for 5.4.7
0.00037908554077148
Output for 5.4.6
0.00063610076904297
Output for 5.4.4
0.00054812431335449
Output for 5.4.1
0.00041580200195312
Output for 5.3.29
0.0010690689086914
Output for 5.3.28
0.00068306922912598
Output for 5.3.27
0.00062012672424316
Output for 5.3.26
0.00051403045654297
Output for 5.3.25
0.00089097023010254
Output for 5.3.24
0.00050997734069824
Output for 5.3.23
0.00071597099304199
Output for 5.3.22
0.00074195861816406
Output for 5.3.21
0.00053811073303223
Output for 5.3.20
0.00062203407287598
Output for 5.3.19
0.00054478645324707
Output for 5.3.18
0.00095009803771973
Output for 5.3.17
0.00079512596130371
Output for 5.3.16
0.00094914436340332
Output for 5.3.15
0.0011978149414062
Output for 5.3.14
0.00061583518981934
Output for 5.3.13
0.00055980682373047
Output for 5.3.12
0.001194953918457
Output for 5.3.11
0.0006411075592041
Output for 5.3.10
0.00099015235900879
Output for 5.3.9
0.0005500316619873
Output for 5.3.8
0.00059986114501953
Output for 5.3.7
0.0011739730834961
Output for 5.3.4
0.00056815147399902
Output for 5.3.3
0.00057101249694824
Output for 5.3.2
0.00063395500183105
Output for 5.3.1
0.00070095062255859
Output for 5.3.0
0.00056099891662598
Output for 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00068306922912598
Output for 5.2.16
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00080585479736328
Output for 5.2.15
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00091695785522461
Output for 5.1.3, 5.2.14
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00072002410888672
Output for 5.2.13
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0012319087982178
Output for 5.2.12
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.001168966293335
Output for 5.2.11
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0012009143829346
Output for 5.2.10
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00064897537231445
Output for 5.2.9
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00085210800170898
Output for 5.2.5, 5.2.8
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00067591667175293
Output for 5.2.7
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00066304206848145
Output for 5.2.6
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00082802772521973
Output for 5.2.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00096988677978516
Output for 5.2.3
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0011799335479736
Output for 5.2.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0012271404266357
Output for 5.2.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00063681602478027
Output for 5.2.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0010960102081299
Output for 5.1.6
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0012500286102295
Output for 5.1.5
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00070500373840332
Output for 5.1.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00082206726074219
Output for 5.1.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00089383125305176
Output for 5.1.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.00065994262695312
Output for 5.1.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0010321140289307
Output for 5.0.5
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0035660266876221
Output for 5.0.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0014419555664062
Output for 5.0.3
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0011589527130127
Output for 5.0.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.002377986907959
Output for 5.0.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0017659664154053
Output for 5.0.0
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/qcPLl on line 7 0.0013959407806396
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/qcPLl on line 4
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
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/qcPLl 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/qcPLl on line 4
Process exited with code 255.

preferences:
181.18 ms | 401 KiB | 248 Q