3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassName { public function foo(): ?self { return new ClassName(); } public function bar(): ?self { return null; } } $instance = new ClassName(); $instance->foo(); $instance->bar();

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.20.0070.01017.74
8.4.10.0030.00617.50
8.3.150.0150.00018.78
8.3.140.0040.00417.18
8.3.130.0040.00418.42
8.3.120.0030.00618.70
8.3.110.0100.00720.94
8.3.100.0040.00416.49
8.3.90.0070.00026.77
8.3.80.0030.00616.50
8.3.70.0140.00416.63
8.3.60.0140.00716.50
8.3.50.0140.00218.24
8.3.40.0110.00718.63
8.3.30.0120.00318.53
8.3.20.0070.00021.73
8.3.10.0040.00421.63
8.3.00.0030.00519.79
8.2.270.0070.01116.66
8.2.260.0040.01118.93
8.2.250.0040.00416.48
8.2.240.0050.00517.37
8.2.230.0040.00422.58
8.2.220.0030.00624.06
8.2.210.0080.01126.77
8.2.200.0060.00316.50
8.2.190.0070.01116.58
8.2.180.0090.00616.50
8.2.170.0070.00718.75
8.2.160.0140.00322.96
8.2.150.0030.00624.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0040.00420.96
8.2.110.0040.00422.12
8.2.100.0070.00417.78
8.2.90.0040.00419.18
8.2.80.0040.00418.03
8.2.70.0040.00417.50
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0050.00319.23
8.2.30.0070.00118.22
8.2.20.0040.00417.90
8.2.10.0070.00017.87
8.2.00.0050.00317.85
8.1.310.0000.00816.58
8.1.300.0100.00619.60
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0050.00320.33
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00320.89
8.1.230.0040.00820.95
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0090.00017.10
8.1.190.0040.00417.23
8.1.180.0070.00018.10
8.1.170.0030.00617.62
8.1.160.0000.00818.83
8.1.150.0040.00420.76
8.1.140.0050.00317.63
8.1.130.0000.00717.39
8.1.120.0000.00717.32
8.1.110.0040.00417.35
8.1.100.0040.00417.35
8.1.90.0000.00817.45
8.1.80.0040.00417.44
8.1.70.0000.00817.39
8.1.60.0000.00817.54
8.1.50.0030.00617.53
8.1.40.0000.00917.53
8.1.30.0000.00817.60
8.1.20.0080.00017.55
8.1.10.0000.01017.37
8.1.00.0000.00817.54
8.0.300.0040.00418.77
8.0.290.0060.00316.58
8.0.280.0000.00718.29
8.0.270.0050.00316.67
8.0.260.0000.00716.71
8.0.250.0030.00316.93
8.0.240.0000.00616.89
8.0.230.0050.00316.78
8.0.220.0000.00816.86
8.0.210.0000.00716.84
8.0.200.0030.00316.95
8.0.190.0020.00516.94
8.0.180.0000.00816.87
8.0.170.0090.00016.91
8.0.160.0000.00816.85
8.0.150.0070.00016.71
8.0.140.0070.00016.79
8.0.130.0030.00313.23
8.0.120.0000.00716.61
8.0.110.0000.00816.84
8.0.100.0080.00016.75
8.0.90.0050.00216.79
8.0.80.0090.00916.83
8.0.70.0000.00716.89
8.0.60.0050.00216.71
8.0.50.0000.00716.81
8.0.30.0150.00217.12
8.0.20.0070.01717.40
8.0.10.0050.00316.95
8.0.00.0140.00816.69
7.4.330.0050.00015.55
7.4.320.0060.00016.55
7.4.300.0060.00316.42
7.4.290.0070.00016.54
7.4.280.0000.00716.45
7.4.270.0040.00416.42
7.4.260.0040.00416.50
7.4.250.0050.00316.49
7.4.240.0050.00216.53
7.4.230.0070.00016.41
7.4.220.0000.00816.57
7.4.210.0050.01016.61
7.4.200.0000.00716.34
7.4.160.0120.00416.46
7.4.140.0110.00717.86
7.4.130.0150.00216.41
7.4.120.0090.01116.47
7.4.110.0110.00716.56
7.4.100.0130.01016.61
7.4.90.0130.00516.34
7.4.80.0100.01017.29
7.4.70.0140.00716.33
7.4.60.0100.01016.21
7.4.50.0090.00916.16
7.4.40.0120.00916.36
7.4.30.0090.01216.33
7.4.20.0190.00416.30
7.4.10.0160.00716.38
7.4.00.0090.00915.98
7.3.330.0060.00013.23
7.3.320.0000.00613.29
7.3.310.0070.00016.27
7.3.300.0030.00616.15
7.3.290.0040.00416.10
7.3.280.0080.01116.25
7.3.260.0140.00616.29
7.3.240.0050.01516.27
7.3.230.0130.01016.42
7.3.220.0100.01316.36
7.3.210.0090.00916.16
7.3.200.0100.01216.17
7.3.190.0130.00716.10
7.3.180.0100.00816.17
7.3.170.0100.00816.02
7.3.160.0120.00916.29
7.3.150.0100.01016.27
7.3.140.0140.01016.28
7.3.130.0100.01116.15
7.3.120.0100.01015.94
7.3.110.0130.00815.69
7.3.100.0100.00915.55
7.3.90.0120.00715.42
7.3.80.0100.00915.47
7.3.70.0120.00815.37
7.3.60.0110.00815.33
7.3.50.0120.00715.30
7.3.40.0120.00715.31
7.3.30.0110.00815.33
7.3.20.0120.00815.86
7.3.10.0120.00915.88
7.3.00.0160.00715.85
7.2.330.0070.00916.21
7.2.320.0120.00816.35
7.2.310.0080.01016.48
7.2.300.0110.01016.44
7.2.290.0120.01016.57
7.2.280.0120.01216.46
7.2.270.0160.00716.49
7.2.260.0140.00916.41
7.2.250.0100.01116.01
7.2.240.0130.00915.95
7.2.230.0110.00915.67
7.2.220.0110.00815.61
7.2.210.0100.00915.61
7.2.200.0130.00815.61
7.2.190.0120.00815.55
7.2.180.0110.00915.54
7.2.170.0110.00815.60
7.2.160.0110.00815.43
7.2.150.0120.01216.08
7.2.140.0130.00816.02
7.2.130.0190.00916.03
7.2.120.0180.00916.05
7.2.110.0170.00916.00
7.2.100.0140.01016.04
7.2.90.0150.00916.05
7.2.80.0160.00915.98
7.2.70.0160.01016.02
7.2.60.0150.00716.08
7.2.50.0150.00816.05
7.2.40.0180.00816.23
7.2.30.0190.00916.25
7.2.20.0230.00816.25
7.2.10.0210.00816.22
7.2.00.0190.01016.20
7.1.330.0160.00815.16
7.1.320.0110.00815.07
7.1.310.0140.00715.05
7.1.300.0130.00614.95
7.1.290.0120.00714.91
7.1.280.0120.00714.95
7.1.270.0140.00714.88
7.1.260.0110.00814.89
7.1.250.0150.00814.87
7.1.240.0180.00814.81
7.1.230.0200.00814.87
7.1.220.0190.00714.82
7.1.210.0170.00914.85
7.1.200.0150.00814.90
7.1.190.0160.00714.90
7.1.180.0200.00914.83
7.1.170.0150.00814.81
7.1.160.0200.00914.99
7.1.150.0260.00914.98
7.1.140.0220.00914.98
7.1.130.0260.00915.03
7.1.120.0240.01014.99
7.1.110.0240.01015.03
7.1.100.0240.00815.02
7.1.90.0180.01014.86
7.1.80.0210.00815.04
7.1.70.0170.00914.89
7.1.60.0240.00816.95
7.1.50.0190.01116.91
7.1.40.0240.00916.88
7.1.30.0270.00716.92
7.1.20.0330.00916.87
7.1.10.0210.00814.79
7.1.00.0220.00914.74
7.0.330.0170.00714.29
7.0.320.0160.00815.13
7.0.310.0170.00615.15
7.0.300.0140.00615.06
7.0.290.0090.01115.00
7.0.280.0140.00815.10
7.0.270.0170.00715.12
7.0.260.0150.00915.16
7.0.250.0190.00714.90
7.0.240.0140.00814.95
7.0.230.0140.00914.87
7.0.220.0160.00714.88
7.0.210.0130.00815.27
7.0.200.0160.00715.16
7.0.190.0150.00715.25
7.0.180.0120.01015.22
7.0.170.0200.00715.23
7.0.160.0150.00915.22
7.0.150.0170.00815.25
7.0.140.0140.00915.23
7.0.130.0160.00715.17
7.0.120.0140.01015.18
7.0.110.0160.00715.19
7.0.100.0170.00915.21
7.0.90.0130.01015.21
7.0.80.0140.00815.16
7.0.70.0140.00715.16
7.0.60.0190.00715.22
7.0.50.0160.00915.23
7.0.40.0150.00915.29
7.0.30.0120.01215.22
7.0.20.0130.00915.19
7.0.10.0120.00915.20
7.0.00.0130.00815.19
5.6.400.0130.00814.79
5.6.390.0130.00914.67
5.6.380.0130.00914.68
5.6.370.0130.01015.46
5.6.360.0110.01215.57
5.6.350.0130.01315.55
5.6.340.0130.01015.54
5.6.330.0150.01015.58
5.6.320.0140.01215.53
5.6.310.0150.00915.58
5.6.300.0170.00815.63
5.6.290.0130.01015.54
5.6.280.0140.01015.57
5.6.270.0150.01115.69
5.6.260.0120.01115.56
5.6.250.0140.00915.65
5.6.240.0170.00915.72
5.6.230.0150.01115.69
5.6.220.0130.01115.63
5.6.210.0140.01015.65
5.6.200.0170.00915.52
5.6.190.0150.01115.62
5.6.180.0170.01015.60
5.6.170.0170.00915.67
5.6.160.0120.01215.53
5.6.150.0120.01115.65
5.6.140.0160.00915.60
5.6.130.0150.01015.61
5.6.120.0170.00715.62
5.6.110.0160.01115.59
5.6.100.0160.00715.44
5.6.90.0150.00915.63
5.6.80.0130.01115.57
5.6.70.0120.01115.59
5.6.60.0150.00915.58
5.6.50.0120.01115.53
5.6.40.0130.01015.49
5.6.30.0130.01115.54
5.6.20.0120.01015.52
5.6.10.0110.01115.52
5.6.00.0100.01215.47

preferences:
30.39 ms | 403 KiB | 5 Q