3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {public int $i = 42;} const BARE_CONSTANT = new A; class B { const ClassConstant = BARE_CONSTANT; } class C { const ClassConstantViaPropertyFetching1 = BARE_CONSTANT->i; const ClassConstantViaPropertyFetching2 = B::ClassConstant->i; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.1.70.0140.00317.20
8.1.60.0180.00017.40
8.1.50.0160.00317.39
8.1.40.0110.00717.41
8.1.30.0000.02017.41
8.1.20.0140.01017.49
8.1.10.0220.00017.23
8.1.00.0070.01117.30
8.0.200.0120.00416.83
8.0.190.0120.00616.80
8.0.180.0080.00916.77
8.0.170.0090.00616.81
8.0.160.0140.00216.79
8.0.150.0150.00016.77
8.0.140.0140.00316.66
8.0.130.0070.01016.80
8.0.120.0130.00316.72
8.0.110.0110.00616.75
8.0.100.0090.00916.69
8.0.90.0080.00816.69
8.0.80.0080.00816.73
8.0.70.0140.00316.84
8.0.60.0110.00416.77
8.0.50.0110.00516.73
8.0.30.0070.01016.66
8.0.20.0090.00616.82
8.0.10.0030.00616.91
7.4.300.0120.00416.43
7.4.290.0130.00516.45
7.4.280.0110.00516.32
7.4.270.0170.00016.29
7.4.260.0160.00016.21
7.4.250.0090.00916.41
7.4.240.0000.01716.30
7.4.230.0090.01016.32
7.4.220.0080.00816.33
7.4.210.0000.01616.38
7.4.200.0080.00816.42
7.4.190.0120.00316.44
7.4.180.0090.00616.34
7.4.160.0110.00416.29
7.4.150.0120.00316.38
7.4.140.0110.00616.27
7.4.130.0100.00516.30
7.4.120.0050.01016.20
7.4.110.0110.00416.15
7.4.100.0130.00316.23
7.4.90.0100.00516.24
7.4.80.0150.00016.11
7.4.70.0000.01416.23
7.4.60.0070.00716.24
7.4.50.0150.00016.05
7.4.40.0150.00016.03
7.4.30.0090.00616.27
7.4.20.0110.00216.21
7.4.10.0140.00016.09
7.4.00.0090.00616.29

preferences:
137.59 ms | 1398 KiB | 7 Q