3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct () { // blah! } public function foo () : self { return $this; } } (new A)->foo();

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.3.40.0090.00618.76
8.3.30.0060.01218.79
8.3.20.0110.00320.25
8.3.10.0060.00323.66
8.3.00.0030.00717.38
8.2.170.0100.00722.96
8.2.160.0180.00020.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0020.00526.16
8.2.120.0040.00419.76
8.2.110.0070.00322.07
8.2.100.0070.00417.59
8.2.90.0060.00317.63
8.2.80.0080.00017.97
8.2.70.0090.00017.80
8.2.60.0030.00517.97
8.2.50.0060.00318.07
8.2.40.0040.00419.70
8.2.30.0040.00417.92
8.2.20.0030.00617.62
8.2.10.0030.00617.84
8.2.00.0090.00017.92
8.1.270.0070.01120.32
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01022.36
8.1.230.0090.00320.85
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00617.23
8.1.190.0000.00918.88
8.1.180.0000.00818.10
8.1.170.0100.00018.55
8.1.160.0000.00718.75
8.1.150.0030.00618.75
8.1.140.0050.00217.32
8.1.130.0030.00317.75
8.1.120.0000.00717.26
8.1.110.0000.00817.35
8.1.100.0040.00417.29
8.1.90.0030.00417.27
8.1.80.0040.00417.32
8.1.70.0000.00717.20
8.1.60.0030.00617.39
8.1.50.0030.00517.47
8.1.40.0000.00817.32
8.1.30.0000.00817.62
8.1.20.0000.00717.56
8.1.10.0040.00417.27
8.1.00.0040.00417.36
8.0.300.0070.00020.16
8.0.290.0040.00416.63
8.0.280.0000.00718.37
8.0.270.0030.00317.22
8.0.260.0000.00717.18
8.0.250.0060.00016.74
8.0.240.0030.00316.76
8.0.230.0050.00316.84
8.0.220.0030.00316.82
8.0.210.0080.00016.73
8.0.200.0000.00716.74
8.0.190.0050.00316.74
8.0.180.0040.00416.85
8.0.170.0060.00316.74
8.0.160.0030.00316.75
8.0.150.0000.00716.84
8.0.140.0030.00416.79
8.0.130.0030.00313.27
8.0.120.0000.00716.74
8.0.110.0050.00216.81
8.0.100.0040.00416.67
8.0.90.0040.00416.78
8.0.80.0030.01716.86
8.0.70.0040.00416.67
8.0.60.0070.00016.86
8.0.50.0000.00716.76
8.0.30.0090.01016.82
8.0.20.0120.00817.40
8.0.10.0040.00416.95
8.0.00.0100.00716.65
7.4.330.0030.00315.03
7.4.320.0000.00616.32
7.4.300.0060.00016.42
7.4.290.0030.00316.42
7.4.280.0030.00516.41
7.4.270.0040.00416.45
7.4.260.0040.00416.48
7.4.250.0070.00016.39
7.4.240.0050.00316.47
7.4.230.0070.00016.59
7.4.220.0130.00616.62
7.4.210.0110.00816.47
7.4.200.0050.00316.31
7.4.160.0090.00616.41
7.4.150.0070.01017.40
7.4.140.0210.00517.86
7.4.130.0070.01616.55
7.4.120.0060.01116.50
7.4.110.0070.01016.46
7.4.100.0080.01216.59
7.4.90.0100.00716.27
7.4.80.0140.00919.39
7.4.70.0090.01016.50
7.4.60.0090.00616.34
7.4.50.0000.00816.29
7.4.40.0090.00916.43
7.4.30.0070.01816.28
7.4.00.0040.01114.98
7.3.330.0050.00013.19
7.3.320.0020.00213.21
7.3.310.0040.00416.33
7.3.300.0030.00316.22
7.3.290.0050.00916.22
7.3.280.0080.01016.18
7.3.270.0110.00617.40
7.3.260.0140.00416.41
7.3.250.0120.00516.30
7.3.240.0090.00916.50
7.3.230.0110.00716.54
7.3.210.0140.00416.34
7.3.200.0070.01019.39
7.3.190.0060.01616.16
7.3.180.0150.00616.29
7.3.170.0120.00616.32
7.3.160.0070.01416.15
7.2.330.0120.00616.22
7.2.320.0100.00716.63
7.2.310.0030.01316.22
7.2.300.0100.01016.58
7.2.290.0060.01216.64
7.2.60.0000.00916.74
7.2.00.0030.00918.96
7.1.200.0030.01015.30
7.1.70.0060.00917.00
7.1.60.0000.01117.12
7.1.50.0110.02117.05
7.1.00.0100.07022.30
7.0.200.0000.01416.43
7.0.100.0030.07319.84
7.0.90.0130.07320.09
7.0.80.0130.07019.80
7.0.70.0070.06319.83
7.0.60.0070.08020.03
7.0.50.0130.07720.23
7.0.40.0130.07719.95
7.0.30.0070.09320.14
7.0.20.0100.07020.08
7.0.10.0130.07019.89
7.0.00.0030.08720.02
5.6.280.0030.07020.93
5.6.250.0130.07320.56
5.6.240.0230.06720.63
5.6.230.0030.07020.67
5.6.220.0100.06720.66
5.6.210.0130.05020.51
5.6.200.0070.08720.97
5.6.190.0070.08021.04
5.6.180.0100.07721.02
5.6.170.0030.08720.89
5.6.160.0100.07721.00
5.6.150.0170.06321.08
5.6.140.0130.08320.96
5.6.130.0130.07720.89
5.6.120.0100.07720.96
5.6.110.0130.07721.05
5.6.100.0230.06720.96
5.6.90.0170.08321.11
5.6.80.0130.07020.39
5.6.70.0000.07720.45
5.6.60.0130.06320.41
5.6.50.0170.06720.45
5.6.40.0100.07020.32
5.6.30.0170.06720.36
5.6.20.0100.07320.33
5.6.10.0000.09020.39
5.6.00.0170.07020.38
5.5.380.0130.06020.40
5.5.370.0170.06320.30
5.5.360.0170.07320.39
5.5.350.0070.08020.34
5.5.340.0000.06320.58
5.5.330.0070.08020.86
5.5.320.0030.08720.88
5.5.310.0070.08320.79
5.5.300.0030.06720.84
5.5.290.0170.07720.75
5.5.280.0030.09320.73
5.5.270.0000.09020.88
5.5.260.0070.08320.77
5.5.250.0170.07020.65
5.5.240.0170.06019.96
5.5.230.0030.08720.23
5.5.220.0170.06320.25
5.5.210.0070.08720.16
5.5.200.0100.08020.14
5.5.190.0130.05320.21
5.5.180.0170.07320.06
5.5.160.0070.07720.07
5.5.150.0070.07720.16
5.5.140.0200.06720.14
5.5.130.0130.07320.20
5.5.120.0130.07020.18
5.5.110.0130.08020.23
5.5.100.0070.05020.12
5.5.90.0130.06720.02
5.5.80.0070.07719.96
5.5.70.0130.07320.01
5.5.60.0170.06720.09
5.5.50.0100.07020.05
5.5.40.0130.07720.10
5.5.30.0130.06719.88
5.5.20.0130.05719.94
5.5.10.0030.08020.09
5.5.00.0100.07719.95
5.4.450.0100.07319.51
5.4.440.0130.08019.16
5.4.430.0070.07719.48
5.4.420.0100.07719.36
5.4.410.0070.08019.23
5.4.400.0130.07719.17
5.4.390.0100.07019.14
5.4.380.0130.06319.10
5.4.370.0100.06719.13
5.4.360.0100.05719.10
5.4.350.0100.06019.05
5.4.340.0070.07719.17
5.4.320.0070.08319.14
5.4.310.0130.07019.14
5.4.300.0130.07318.85
5.4.290.0070.07718.82
5.4.280.0030.08319.09
5.4.270.0100.05019.04
5.4.260.0100.07018.88
5.4.250.0030.07318.87
5.4.240.0070.07318.94
5.4.230.0230.05318.84
5.4.220.0070.07319.20
5.4.210.0100.07018.88
5.4.200.0000.05019.23
5.4.190.0170.06719.04
5.4.180.0070.07319.20
5.4.170.0100.07319.02
5.4.160.0070.07319.19
5.4.150.0170.06719.21
5.4.140.0130.07016.36
5.4.130.0030.06016.41
5.4.120.0030.07716.40
5.4.110.0030.07316.39
5.4.100.0030.07716.39
5.4.90.0100.07316.43
5.4.80.0130.06716.41
5.4.70.0100.06316.48
5.4.60.0100.07316.47
5.4.50.0100.07316.40
5.4.40.0130.06716.43
5.4.30.0070.07016.44
5.4.20.0070.07016.31
5.4.10.0000.07316.49
5.4.00.0030.06715.84
5.3.290.0170.05014.74
5.3.280.0100.07314.69
5.3.270.0030.05014.58
5.3.260.0100.07014.63
5.3.250.0130.06714.73
5.3.240.0070.07314.59
5.3.230.0170.07014.63
5.3.220.0070.06714.66
5.3.210.0070.07714.55
5.3.200.0100.06714.64
5.3.190.0200.06314.67
5.3.180.0130.07314.66
5.3.170.0070.07714.68
5.3.160.0070.07714.54
5.3.150.0070.07014.69
5.3.140.0070.07714.58
5.3.130.0070.07714.56
5.3.120.0030.08014.69
5.3.110.0100.06714.60
5.3.100.0230.04314.02
5.3.90.0070.06314.05
5.3.80.0130.04313.95
5.3.70.0170.06014.09
5.3.60.0070.06014.01
5.3.50.0070.04313.88
5.3.40.0070.06313.86
5.3.30.0070.07314.07
5.3.20.0130.04013.81
5.3.10.0100.05013.65
5.3.00.0000.07713.73
5.2.170.0170.05311.05
5.2.160.0070.04711.06
5.2.150.0070.06311.05
5.2.140.0100.05711.19
5.2.130.0000.06311.24
5.2.120.0030.06011.03
5.2.110.0100.05711.02
5.2.100.0030.06011.20
5.2.90.0130.05011.16
5.2.80.0130.06011.01
5.2.70.0000.05311.19
5.2.60.0030.06011.19
5.2.50.0200.05010.91
5.2.40.0000.06311.02
5.2.30.0070.06010.98
5.2.20.0030.05710.99
5.2.10.0030.06310.79
5.2.00.0030.06010.75
5.1.60.0030.0539.85
5.1.50.0070.05010.06
5.1.40.0070.04710.02
5.1.30.0030.05710.41
5.1.20.0030.05310.41
5.1.10.0030.06010.06
5.1.00.0000.0539.91
5.0.50.0030.0238.53
5.0.40.0100.0378.47
5.0.30.0030.0638.33
5.0.20.0000.0438.24
5.0.10.0000.0438.18
5.0.00.0000.0708.11
4.4.90.0070.0338.11
4.4.80.0000.0208.11
4.4.70.0030.0208.11
4.4.60.0000.0408.11
4.4.50.0070.0308.11
4.4.40.0030.0578.11
4.4.30.0000.0378.11
4.4.20.0000.0408.11
4.4.10.0000.0408.11
4.4.00.0000.0538.11
4.3.110.0000.0408.11
4.3.100.0000.0338.11
4.3.90.0030.0338.11
4.3.80.0000.0408.11
4.3.70.0000.0308.11
4.3.60.0030.0408.11
4.3.50.0030.0178.11
4.3.40.0100.0438.11
4.3.30.0030.0338.11
4.3.20.0030.0378.11
4.3.10.0000.0378.11
4.3.00.0030.0378.11

preferences:
53.4 ms | 400 KiB | 5 Q