3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const X = 1 + self::Z; const Y = 1 - self::Z; const Z = self::Z; function f() { echo static::X; echo static::Y; echo static::Z; } } class B extends A { const Z = 1; } (new B)->f();

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.4.120.0070.00320.30
8.4.110.0120.00518.66
8.4.100.0070.01417.79
8.4.90.0140.00720.69
8.4.80.0090.00718.82
8.4.70.0030.00518.98
8.4.60.0100.01120.82
8.4.50.0050.00418.86
8.4.40.0100.00619.63
8.4.30.0070.00417.82
8.4.20.0130.00319.38
8.4.10.0030.00619.75
8.3.250.0110.00718.91
8.3.240.0130.00616.45
8.3.230.0070.00916.57
8.3.220.0140.00420.81
8.3.210.0120.00616.82
8.3.200.0020.00716.76
8.3.190.0040.00416.97
8.3.180.0120.00618.89
8.3.170.0110.00717.13
8.3.160.0040.00417.05
8.3.150.0160.00316.48
8.3.140.0160.00016.54
8.3.130.0040.00416.57
8.3.120.0130.00618.84
8.3.110.0030.00620.94
8.3.100.0060.00318.38
8.3.90.0050.00326.77
8.3.80.0040.00717.97
8.3.70.0110.01116.63
8.3.60.0070.01016.63
8.3.50.0160.00417.28
8.3.40.0040.01118.62
8.3.30.0070.00718.52
8.3.20.0050.00220.35
8.3.10.0040.00423.65
8.3.00.0080.00023.52
8.2.290.0090.00916.99
8.2.280.0100.00718.38
8.2.270.0030.01616.61
8.2.260.0000.00817.13
8.2.250.0080.00018.39
8.2.240.0060.00318.89
8.2.230.0060.00322.58
8.2.220.0170.00024.06
8.2.210.0120.00626.77
8.2.200.0050.00716.62
8.2.190.0040.01216.63
8.2.180.0180.00316.50
8.2.170.0040.01222.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00422.27
8.2.120.0040.00426.35
8.2.110.0060.00319.38
8.2.100.0000.01117.91
8.2.90.0000.00822.18
8.2.80.0080.00017.97
8.2.70.0090.00017.80
8.2.60.0000.00817.91
8.2.50.0040.00418.22
8.2.40.0040.00420.59
8.2.30.0080.00019.11
8.2.20.0000.00717.85
8.2.10.0050.00217.89
8.2.00.0030.00618.01
8.1.330.0110.00916.38
8.1.320.0120.00915.88
8.1.310.0000.00816.58
8.1.300.0060.00317.82
8.1.290.0030.00630.84
8.1.280.0060.00925.92
8.1.270.0040.00423.77
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00721.77
8.1.230.0080.00420.96
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00317.35
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0040.00418.75
8.1.150.0000.00720.07
8.1.140.0050.00319.43
8.1.130.0000.00718.75
8.1.120.0030.00317.29
8.1.110.0050.00317.22
8.1.100.0050.00217.15
8.1.90.0000.00817.33
8.1.80.0040.00417.21
8.1.70.0000.00717.37
8.1.60.0030.00517.34
8.1.50.0080.00017.50
8.1.40.0070.00017.48
8.1.30.0000.00817.58
8.1.20.0070.00017.52
8.1.10.0030.00517.53
8.1.00.0000.00717.46
8.0.300.0040.00419.98
8.0.290.0080.00016.63
8.0.280.0070.00018.43
8.0.270.0000.00717.20
8.0.260.0030.00316.77
8.0.250.0000.00716.94
8.0.240.0050.00316.93
8.0.230.0000.00716.91
8.0.220.0030.00316.90
8.0.210.0070.00016.91
8.0.200.0000.00616.95
8.0.190.0040.00416.96
8.0.180.0000.00816.91
8.0.170.0000.00716.93
8.0.160.0030.00516.89
8.0.150.0000.00716.82
8.0.140.0040.00416.73
8.0.130.0030.00313.39
8.0.120.0030.00516.73
8.0.110.0000.00716.73
8.0.100.0040.00416.91
8.0.90.0040.00416.77
8.0.80.0070.00816.82
8.0.70.0050.00216.75
8.0.60.0000.00716.95
8.0.50.0040.00416.94
8.0.30.0080.01017.01
8.0.20.0090.01017.40
8.0.10.0040.00417.05
8.0.00.0120.00616.82
7.4.330.0040.00316.66
7.4.320.0030.00316.49
7.4.300.0040.00416.49
7.4.290.0040.00416.56
7.4.280.0060.00316.41
7.4.270.0030.00716.38
7.4.260.0050.00316.43
7.4.250.0030.00316.48
7.4.240.0040.00416.54
7.4.230.0070.00016.24
7.4.220.0160.01116.18
7.4.210.0110.00416.55
7.4.200.0030.00316.48
7.4.160.0090.00616.59
7.4.150.0040.01317.40
7.4.140.0130.00517.86
7.4.130.0110.00616.35
7.4.120.0050.01316.45
7.4.110.0100.01016.37
7.4.100.0110.00616.40
7.4.90.0140.00316.57
7.4.80.0040.01719.39
7.4.70.0110.00616.56
7.4.60.0200.00316.36
7.4.50.0110.00316.44
7.4.40.0140.00316.72
7.4.30.0130.00316.37
7.4.00.0060.00914.88
7.3.330.0000.00513.32
7.3.320.0050.00013.33
7.3.310.0000.00716.36
7.3.300.0070.00016.23
7.3.290.0100.00816.28
7.3.280.0080.00916.29
7.3.270.0000.01717.40
7.3.260.0110.00916.47
7.3.250.0110.00616.35
7.3.240.0110.00616.56
7.3.230.0160.00716.48
7.3.210.0130.00316.38
7.3.200.0090.00916.50
7.3.190.0160.00016.40
7.3.180.0060.00916.21
7.3.170.0090.00616.49
7.3.160.0060.01016.23
7.3.120.0120.00014.72
7.3.110.0140.00314.56
7.3.100.0120.00014.39
7.3.90.0100.00314.53
7.3.80.0000.01515.07
7.3.70.0030.01014.64
7.3.60.0070.00714.91
7.3.50.0060.00614.63
7.3.40.0050.00514.84
7.3.30.0080.00814.71
7.3.20.0040.00716.73
7.3.10.0040.00816.57
7.3.00.0000.01216.59
7.2.330.0100.00716.38
7.2.320.0030.01316.64
7.2.310.0090.01216.55
7.2.300.0060.01116.50
7.2.290.0060.01316.68
7.2.250.0000.01614.95
7.2.240.0120.00914.75
7.2.230.0030.01314.83
7.2.220.0070.01014.78
7.2.210.0070.01115.13
7.2.200.0030.01014.70
7.2.190.0090.00614.79
7.2.180.0070.01014.85
7.2.170.0070.00714.94
7.2.60.0060.00916.57
7.1.330.0070.00715.73
7.1.320.0060.00915.50
7.1.310.0030.00615.74
7.1.300.0090.00315.33
7.1.290.0060.00315.50
7.1.280.0000.01515.42
7.1.270.0040.00715.59
7.1.260.0030.01015.62
7.1.200.0140.01015.57
7.1.110.0090.00616.01
7.1.100.0040.01116.09
7.1.90.0100.01016.01
7.1.80.0150.00916.13
7.1.70.0130.01015.18
7.1.60.0190.00934.93
7.1.50.0160.02034.81
7.1.40.0210.00734.23
7.1.30.0150.01534.25
7.1.20.0170.01034.28
7.1.10.0030.01016.29
7.1.00.0040.01316.38
7.0.250.0100.00315.69
7.0.240.0030.01015.59
7.0.230.0070.01415.79
7.0.220.0090.00615.66
7.0.210.0040.01714.42
7.0.200.0030.00916.81
7.0.190.0060.00916.35
7.0.180.0060.00616.20
7.0.170.0030.01116.12
7.0.160.0040.01116.38
7.0.150.0000.01216.23
7.0.140.0110.00316.25
7.0.130.0100.00316.32
7.0.120.0030.01016.41
7.0.110.0030.00916.20
7.0.100.0030.01016.32
7.0.90.0060.00616.19
7.0.80.0080.00516.09
7.0.70.0030.00915.90
7.0.60.0000.01215.91
7.0.50.0090.00316.05
7.0.40.0060.00616.23
7.0.30.0040.00716.16
7.0.20.0100.00316.27
7.0.10.0030.00916.17
7.0.00.0040.00816.02

preferences:
27.51 ms | 403 KiB | 5 Q