3v4l.org

run code in 300+ PHP versions simultaneously
<?hh namespace A { class T {} } namespace { $hello = 42; class Test { public function first(string $str): Closure { return function(): int use ($str) { return strlen($str); }; } public function second(int $i): self { } } $t = new Test; echo ($t->first("hello"))(); }

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.0120.00916.38
8.3.50.0090.01421.12
8.3.40.0110.01118.84
8.3.30.0090.00618.44
8.3.20.0070.00020.21
8.3.10.0000.00721.73
8.3.00.0060.00323.45
8.2.180.0120.00317.93
8.2.170.0130.00622.96
8.2.160.0110.00320.39
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00519.24
8.2.120.0040.00426.35
8.2.110.0080.00022.09
8.2.100.0040.00717.80
8.2.90.0050.00319.17
8.2.80.0040.00418.04
8.2.70.0000.00917.63
8.2.60.0040.00417.80
8.2.50.0000.00918.07
8.2.40.0040.00422.28
8.2.30.0000.00720.62
8.2.20.0060.00317.43
8.2.10.0040.00417.94
8.2.00.0000.00717.84
8.1.280.0060.01325.92
8.1.270.0150.00420.38
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0130.00323.98
8.1.230.0070.00419.17
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0040.00417.10
8.1.180.0070.00018.10
8.1.170.0040.00418.53
8.1.160.0040.00420.53
8.1.150.0040.00418.75
8.1.140.0000.00819.47
8.1.130.0030.00317.48
8.1.120.0040.00417.30
8.1.110.0000.00717.22
8.1.100.0040.00417.39
8.1.90.0040.00417.33
8.1.80.0040.00417.34
8.1.70.0040.00417.34
8.1.60.0070.00017.43
8.1.50.0050.00317.28
8.1.40.0000.00817.29
8.1.30.0080.00017.43
8.1.20.0060.00317.51
8.1.10.0050.00217.42
8.1.00.0050.00217.40
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0030.00318.36
8.0.270.0030.00617.25
8.0.260.0000.00617.25
8.0.250.0050.00316.85
8.0.240.0040.00416.71
8.0.230.0030.00316.70
8.0.220.0030.00516.78
8.0.210.0050.00216.61
8.0.200.0030.00316.81
8.0.190.0040.00716.83
8.0.180.0000.00716.77
8.0.170.0040.00416.78
8.0.160.0050.00316.77
8.0.150.0030.00316.72
8.0.140.0040.00416.60
8.0.130.0000.00513.32
8.0.120.0050.00216.63
8.0.110.0040.00416.70
8.0.100.0000.00716.84
8.0.90.0000.00916.66
8.0.80.0090.01116.81
8.0.70.0000.00816.77
8.0.60.0040.00416.64
8.0.50.0030.00316.80
8.0.30.0100.01217.03
8.0.20.0090.01017.40
8.0.10.0020.00516.75
8.0.00.0080.01216.58
7.4.330.0030.00316.89
7.4.320.0000.00716.32
7.4.300.0000.00616.46
7.4.290.0070.00016.27
7.4.280.0040.00416.35
7.4.270.0000.00716.45
7.4.260.0090.00016.40
7.4.250.0050.00216.43
7.4.240.0050.00216.38
7.4.230.0030.00316.26
7.4.220.0100.01016.32
7.4.210.0060.01316.46
7.4.200.0000.00716.36
7.4.160.0110.00416.57
7.4.150.0000.01717.40
7.4.140.0090.00917.86
7.4.130.0090.01116.26
7.4.120.0070.01016.25
7.4.110.0100.00716.45
7.4.100.0050.01516.41
7.4.90.0120.00916.22
7.4.80.0000.01819.39
7.4.70.0120.00316.35
7.4.60.0090.00616.32
7.4.50.0050.00816.39
7.4.40.0070.01016.59
7.4.30.0140.00316.50
7.3.330.0000.00513.04
7.3.320.0050.00013.19
7.3.310.0030.00316.23
7.3.300.0030.00316.16
7.3.290.0050.00916.12
7.3.280.0100.00816.12
7.3.270.0030.01317.40
7.3.260.0090.01316.46
7.3.250.0090.00916.13
7.3.240.0160.00716.29
7.3.230.0100.00716.39
7.3.210.0140.00316.52
7.3.200.0070.01316.46
7.3.190.0030.01216.33
7.3.180.0100.00716.35
7.3.170.0130.00316.50
7.3.160.0130.00716.24
7.2.330.0100.00616.31
7.2.320.0100.00716.60
7.2.310.0070.01016.48
7.2.300.0140.00316.39
7.2.290.0080.01516.30
7.0.00.0070.09020.14
5.6.160.0100.05320.54
5.6.150.0170.05018.21
5.6.140.0100.07318.18
5.6.130.0000.05718.20
5.6.120.0030.05021.14
5.6.110.0170.07321.16
5.6.100.0170.06321.02
5.6.90.0070.06720.97
5.6.80.0070.05020.37
5.5.300.0130.07317.97
5.5.290.0070.05718.07
5.5.280.0100.08720.80
5.5.270.0070.05020.96
5.5.260.0200.07020.84
5.5.250.0130.03020.57
5.5.240.0200.06320.36

preferences:
49.58 ms | 401 KiB | 5 Q