3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function first(string $str): string { function nested() { } return $str; } public function second(int $i): int { return $i; } } $t = new Test; echo $t->first(42); echo $t->second(42);

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.60.0140.00716.38
8.3.50.0070.01122.06
8.3.40.0070.00718.74
8.3.30.0110.00318.76
8.3.20.0070.00020.04
8.3.10.0040.00423.56
8.3.00.0090.00023.48
8.2.180.0030.01616.38
8.2.170.0140.00022.96
8.2.160.0160.00320.55
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00719.20
8.2.120.0000.00726.35
8.2.110.0070.00422.08
8.2.100.0040.00717.80
8.2.90.0050.00319.20
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0080.00022.33
8.2.30.0040.00420.71
8.2.20.0040.00417.61
8.2.10.0000.00718.09
8.2.00.0030.00517.98
8.1.280.0090.00925.92
8.1.270.0180.00020.24
8.1.260.0070.00028.09
8.1.250.0060.00328.09
8.1.240.0070.01123.97
8.1.230.0000.01519.12
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0080.00018.51
8.1.160.0030.00320.60
8.1.150.0000.00718.86
8.1.140.0000.00819.55
8.1.130.0030.00317.75
8.1.120.0040.00417.34
8.1.110.0000.00717.43
8.1.100.0050.00217.40
8.1.90.0030.00517.38
8.1.80.0040.00417.48
8.1.70.0030.00317.31
8.1.60.0000.00817.54
8.1.50.0040.00417.43
8.1.40.0040.00417.49
8.1.30.0030.00517.54
8.1.20.0000.00817.53
8.1.10.0030.00517.46
8.1.00.0000.00717.56
8.0.300.0000.00918.77
8.0.290.0000.00816.75
8.0.280.0000.00718.34
8.0.270.0030.00317.14
8.0.260.0000.00617.30
8.0.250.0000.00717.02
8.0.240.0040.00417.01
8.0.230.0000.00717.04
8.0.220.0080.00016.78
8.0.210.0030.00316.87
8.0.200.0000.00716.94
8.0.190.0000.00716.84
8.0.180.0000.00716.89
8.0.170.0020.00516.87
8.0.160.0030.00316.95
8.0.150.0000.00716.95
8.0.140.0050.00316.84
8.0.130.0030.00313.38
8.0.120.0040.00416.96
8.0.110.0030.00516.93
8.0.100.0040.00416.88
8.0.90.0030.00616.94
8.0.80.0140.00016.93
8.0.70.0040.00416.82
8.0.60.0040.00416.77
8.0.50.0040.00416.94
8.0.30.0080.00917.26
8.0.20.0100.00917.40
8.0.10.0070.00017.11
8.0.00.0120.00816.79
7.4.330.0000.00516.87
7.4.320.0000.00716.48
7.4.300.0030.00316.55
7.4.290.0030.00316.54
7.4.280.0000.00716.57
7.4.270.0030.00316.48
7.4.260.0030.00316.58
7.4.250.0000.00716.46
7.4.240.0040.00416.53
7.4.230.0000.00716.38
7.4.220.0160.00716.61
7.4.210.0040.01216.47
7.4.200.0000.00716.48
7.4.160.0060.00916.45
7.4.150.0130.00317.40
7.4.140.0120.00617.86
7.4.130.0110.00616.52
7.4.120.0100.00716.74
7.4.110.0040.01416.57
7.4.100.0030.01316.47
7.4.90.0130.00416.40
7.4.80.0140.00319.39
7.4.70.0060.00916.57
7.4.60.0140.00716.45
7.4.50.0090.00516.32
7.4.40.0150.00316.34
7.4.30.0130.00316.41
7.4.00.0030.01615.01
7.3.330.0030.00313.05
7.3.320.0020.00213.10
7.3.310.0070.00016.22
7.3.300.0000.00716.20
7.3.290.0090.00716.16
7.3.280.0130.00616.22
7.3.270.0090.00917.40
7.3.260.0130.01016.58
7.3.250.0080.01216.31
7.3.240.0080.01016.30
7.3.230.0100.00616.47
7.3.210.0080.00816.37
7.3.200.0090.01116.15
7.3.190.0070.01016.51
7.3.180.0090.00616.40
7.3.170.0060.01616.27
7.3.160.0000.01716.22
7.3.120.0050.00714.82
7.3.110.0040.01414.61
7.3.100.0090.00614.61
7.3.90.0030.01014.71
7.3.80.0030.00614.98
7.3.70.0120.00414.41
7.3.60.0070.00714.63
7.3.50.0060.00614.65
7.3.40.0110.00414.32
7.3.30.0040.01114.45
7.3.20.0030.01016.28
7.3.10.0070.00316.67
7.3.00.0030.01016.46
7.2.330.0070.01416.64
7.2.320.0140.00716.61
7.2.310.0100.00616.38
7.2.300.0060.01016.71
7.2.290.0080.00816.50
7.2.250.0030.01414.96
7.2.240.0030.01314.61
7.2.230.0070.00414.81
7.2.220.0070.00714.71
7.2.210.0000.01115.02
7.2.200.0040.00815.04
7.2.190.0070.00314.97
7.2.180.0030.01415.18
7.2.170.0060.00914.95
7.2.60.0080.00616.83
7.2.00.0030.01019.18
7.1.330.0090.00615.81
7.1.320.0070.00715.89
7.1.310.0060.00915.82
7.1.300.0030.01015.74
7.1.290.0060.00915.75
7.1.280.0080.00015.70
7.1.270.0100.00315.49
7.1.260.0060.00615.70
7.1.200.0040.01115.52
7.1.100.0040.00818.06
7.1.70.0000.00717.13
7.1.60.0090.01519.52
7.1.50.0030.00716.94
7.1.00.0030.07722.31
7.0.200.0130.00016.49
7.0.60.0070.06019.91
7.0.50.0100.07717.88
7.0.40.0070.04720.25
7.0.30.0270.05020.11
7.0.20.0370.06720.16
7.0.10.0030.06720.16
7.0.00.0070.04320.22
5.6.280.0000.03320.77
5.6.210.0070.08720.77
5.6.200.0030.05018.13
5.6.190.0000.05020.46
5.6.180.0270.05020.55
5.6.170.0270.08020.47
5.6.160.0200.07320.39
5.6.150.0030.08018.19
5.6.140.0030.04018.18
5.6.130.0170.07718.16
5.6.120.0030.07721.01
5.6.110.0200.07721.03
5.6.100.0200.07720.98
5.6.90.0100.08320.96
5.6.80.0130.07320.51
5.5.350.2470.03320.48
5.5.340.0030.07018.07
5.5.330.0030.07020.27
5.5.320.0370.07020.25
5.5.310.0230.03320.27
5.5.300.0100.07717.94
5.5.290.0030.08318.08
5.5.280.0200.05320.85
5.5.270.0030.07020.75
5.5.260.0100.08720.79
5.5.250.0130.07320.59
5.5.240.0230.06320.15

preferences:
57.38 ms | 401 KiB | 5 Q