3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(){ $sum = 0; return function ($i) use($sum) { $sum += $i; return $sum; }; } $myfunc = test(); for($i = 0; $i < 5; $i++){ echo $myfunc($i) . PHP_EOL; }

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.0000.01418.87
8.3.30.0030.01319.34
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.170.0100.00318.96
8.2.160.0110.00422.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.98
8.2.110.0030.00720.52
8.2.100.0040.00717.84
8.2.90.0060.00317.91
8.2.80.0040.00419.23
8.2.70.0080.00017.50
8.2.60.0080.00017.93
8.2.50.0030.00618.07
8.2.40.0040.00419.89
8.2.30.0030.00518.00
8.2.20.0040.00420.36
8.2.10.0000.00818.02
8.2.00.0000.00719.18
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0070.01022.66
8.1.230.0110.00021.10
8.1.220.0030.00517.80
8.1.210.0000.00919.04
8.1.200.0000.00817.35
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0030.00518.32
8.1.160.0030.00518.88
8.1.150.0030.00518.50
8.1.140.0040.00417.43
8.1.130.0000.00718.80
8.1.120.0080.00217.46
8.1.110.0000.00917.46
8.1.100.0000.00717.45
8.1.90.0000.00817.35
8.1.80.0030.00517.36
8.1.70.0000.00717.35
8.1.60.0080.00417.57
8.1.50.0160.00517.39
8.1.40.0180.00517.39
8.1.30.0170.00317.60
8.1.20.0140.00617.68
8.1.10.0170.00317.44
8.1.00.0120.00717.48
8.0.300.0080.00020.00
8.0.290.0000.00716.75
8.0.280.0040.00418.50
8.0.270.0070.00016.68
8.0.260.0020.00518.35
8.0.250.0080.00016.93
8.0.240.0040.00416.94
8.0.230.0000.00716.96
8.0.220.0000.00816.88
8.0.210.0000.00716.88
8.0.200.0040.00416.83
8.0.190.0070.00016.91
8.0.180.0060.00416.69
8.0.170.0090.00416.74
8.0.160.0040.00816.72
8.0.150.0050.00716.67
8.0.140.0100.00616.79
8.0.130.0140.00016.79
8.0.120.0060.00616.83
8.0.110.0060.00616.71
8.0.100.0070.00516.88
8.0.90.0080.00616.70
8.0.80.0110.00616.71
8.0.70.0090.00916.84
8.0.60.0160.00616.78
8.0.50.0150.00416.79
8.0.30.0140.00516.78
8.0.20.0140.00616.93
8.0.10.0160.00216.97
7.4.330.0000.00415.55
7.4.320.0030.00316.48
7.4.300.0000.00616.61
7.4.290.0130.00816.52
7.4.280.0130.00916.46
7.4.270.0110.00716.49
7.4.260.0200.00216.51
7.4.250.0150.00516.49
7.4.240.0140.00216.50
7.4.230.0180.00216.50
7.4.220.0140.00316.42
7.4.210.0140.00316.45
7.4.200.0080.01016.44
7.4.190.0170.00116.49
7.4.180.0110.00516.49
7.4.160.0150.00316.44
7.4.150.0130.00416.38
7.4.140.0060.00416.19
7.4.130.0140.00416.25
7.4.120.0100.00916.39
7.4.110.0190.00516.43
7.4.100.0240.00016.44
7.4.90.0140.00516.36
7.4.80.0160.00316.31
7.4.70.0150.00416.39
7.4.60.0140.00416.32
7.4.50.0090.00516.25
7.4.40.0070.00516.11
7.4.30.0090.00416.16
7.4.20.0050.00716.34
7.4.10.0100.00316.41
7.4.00.0060.00516.46

preferences:
55.63 ms | 400 KiB | 5 Q