3v4l.org

run code in 300+ PHP versions simultaneously
<?hh 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.70.0120.00318.06
8.3.60.0100.01016.61
8.3.50.0120.00721.93
8.3.40.0150.00018.71
8.3.30.0170.00318.60
8.3.20.0040.00420.27
8.3.10.0050.00323.67
8.3.00.0030.00623.48
8.2.190.0090.00618.04
8.2.180.0100.01016.50
8.2.170.0100.01018.84
8.2.160.0070.00722.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00319.39
8.2.120.0070.00726.35
8.2.110.0090.00021.04
8.2.100.0070.00417.91
8.2.90.0000.00819.28
8.2.80.0080.00017.97
8.2.70.0050.00517.50
8.2.60.0040.00417.55
8.2.50.0040.00418.07
8.2.40.0080.00022.34
8.2.30.0040.00420.49
8.2.20.0000.00717.52
8.2.10.0000.00817.93
8.2.00.0040.00417.79
8.1.280.0150.00025.92
8.1.270.0150.00420.40
8.1.260.0070.00028.09
8.1.250.0030.00728.09
8.1.240.0090.00317.36
8.1.230.0150.00019.09
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0080.00017.13
8.1.180.0020.00518.10
8.1.170.0000.00818.59
8.1.160.0000.00720.59
8.1.150.0000.00718.65
8.1.140.0000.00819.35
8.1.130.0000.00817.55
8.1.120.0000.00717.31
8.1.110.0040.00417.29
8.1.100.0040.00417.30
8.1.90.0000.00717.29
8.1.80.0050.00317.34
8.1.70.0030.00317.29
8.1.60.0040.00417.43
8.1.50.0040.00417.38
8.1.40.0080.00017.34
8.1.30.0000.00817.53
8.1.20.0060.00317.41
8.1.10.0050.00217.47
8.1.00.0040.00417.35
8.0.300.0030.00618.77
8.0.290.0030.00316.75
8.0.280.0040.00418.29
8.0.270.0030.00317.09
8.0.260.0030.00317.18
8.0.250.0030.00316.84
8.0.240.0040.00416.79
8.0.230.0030.00316.75
8.0.220.0000.00816.81
8.0.210.0000.00816.71
8.0.200.0040.00416.88
8.0.190.0040.00416.72
8.0.180.0000.00716.82
8.0.170.0000.00916.77
8.0.160.0000.00816.77
8.0.150.0000.00716.66
8.0.140.0050.00216.68
8.0.130.0000.00613.45
8.0.120.0000.00716.76
8.0.110.0030.00516.72
8.0.100.0000.00716.70
8.0.90.0030.00616.68
8.0.80.0080.00816.77
8.0.70.0000.00816.61
8.0.60.0070.00016.77
8.0.50.0040.00416.65
8.0.30.0100.00616.89
8.0.20.0130.00617.40
8.0.10.0000.00716.94
8.0.00.0120.00716.69
7.4.330.0000.00516.78
7.4.320.0000.00716.38
7.4.300.0000.00616.26
7.4.290.0030.00316.52
7.4.280.0030.00516.24
7.4.270.0030.00316.43
7.4.260.0030.00316.47
7.4.250.0050.00316.28
7.4.240.0040.00316.31
7.4.230.0000.00816.47
7.4.220.0060.01316.38
7.4.210.0080.00716.40
7.4.200.0000.00616.27
7.4.160.0100.00616.48
7.4.150.0070.01017.40
7.4.140.0110.00717.86
7.4.130.0120.00616.27
7.4.120.0070.01016.45
7.4.110.0100.00716.35
7.4.100.0090.01216.23
7.4.90.0070.01016.39
7.4.80.0100.00619.39
7.4.70.0130.00316.35
7.4.60.0160.00016.22
7.4.50.0070.01016.25
7.4.40.0120.00416.39
7.4.30.0140.00316.39
7.3.330.0000.00612.97
7.3.320.0050.00013.07
7.3.310.0030.00316.06
7.3.300.0000.00715.96
7.3.290.0110.00416.10
7.3.280.0070.01216.07
7.3.270.0140.00317.40
7.3.260.0100.01016.46
7.3.250.0110.00716.17
7.3.240.0100.01116.18
7.3.230.0160.00616.39
7.3.210.0100.00716.32
7.3.200.0130.00316.35
7.3.190.0060.00916.33
7.3.180.0000.01416.57
7.3.170.0100.00616.27
7.3.160.0110.00416.41
7.2.330.0040.01316.45
7.2.320.0160.00616.43
7.2.310.0000.01516.29
7.2.300.0140.00916.58
7.2.290.0080.00816.55
7.0.00.0100.05020.06
5.6.160.0100.03720.47
5.6.150.0100.04318.18
5.6.140.0100.05318.21
5.6.130.0030.04018.22
5.6.120.0000.08320.98
5.6.110.0070.05721.00
5.6.100.0000.06321.00
5.6.90.0070.08720.96
5.6.80.0070.08020.53
5.5.300.0130.04717.95
5.5.290.0070.06318.05
5.5.280.0070.04320.65
5.5.270.0100.08020.71
5.5.260.0130.06320.64
5.5.250.0170.03020.60
5.5.240.0070.05720.27

preferences:
19.3 ms | 401 KiB | 5 Q