3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limit = 5; function test ($limit, $useLimit) { $arr = [1,2,3,4,5,6,7,8,9,10]; foreach($arr as $key => $node) { if (!$useLimit || $key < $limit) { echo $node; } else { break; } } } echo "No limit:\n"; test($limit, false); echo "\n"; echo "With limit:\n"; test($limit, true);

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.00318.43
8.3.50.0130.00616.30
8.3.40.0130.00318.57
8.3.30.0040.01118.75
8.3.20.0080.00018.98
8.3.10.0040.00423.51
8.3.00.0050.00223.36
8.2.180.0110.00725.92
8.2.170.0140.00018.91
8.2.160.0110.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00820.78
8.2.110.0030.00720.83
8.2.100.0070.00417.72
8.2.90.0040.00417.63
8.2.80.0030.00617.97
8.2.70.0040.00417.93
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0030.00519.19
8.2.30.0030.00519.24
8.2.20.0030.00618.05
8.2.10.0000.00719.49
8.2.00.0000.00719.38
8.1.280.0220.00025.92
8.1.270.0000.00821.93
8.1.260.0080.00026.35
8.1.250.0110.00428.09
8.1.240.0050.00520.81
8.1.230.0070.00420.89
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00617.13
8.1.180.0040.00418.10
8.1.170.0000.00818.70
8.1.160.0060.00318.93
8.1.150.0030.00618.94
8.1.140.0020.00517.69
8.1.130.0040.00417.45
8.1.120.0100.00017.45
8.1.110.0020.00517.35
8.1.100.0030.00417.36
8.1.90.0030.00517.47
8.1.80.0000.00817.46
8.1.70.0080.00017.42
8.1.60.0060.00317.63
8.1.50.0030.00517.58
8.1.40.0040.00417.55
8.1.30.0030.00517.66
8.1.20.0030.00617.57
8.1.10.0000.00917.47
8.1.00.0030.00517.30
8.0.300.0040.00420.02
8.0.290.0040.00416.75
8.0.280.0070.00018.50
8.0.270.0000.00717.17
8.0.260.0070.00016.86
8.0.250.0030.00316.97
8.0.240.0050.00317.00
8.0.230.0070.00016.79
8.0.220.0030.00416.89
8.0.210.0000.00816.91
8.0.200.0000.00716.84
8.0.190.0050.00316.99
8.0.180.0040.00416.80
8.0.170.0060.00316.79
8.0.160.0030.00316.98
8.0.150.0000.00716.89
8.0.140.0080.00016.74
8.0.130.0030.00313.26
8.0.120.0040.00416.86
8.0.110.0070.00016.93
8.0.100.0000.00716.70
8.0.90.0000.00716.78
8.0.80.0120.00616.85
8.0.70.0000.00716.89
8.0.60.0050.00316.84
8.0.50.0000.00716.89
8.0.30.0060.01117.02
8.0.20.0100.01017.40
8.0.10.0070.00017.07
8.0.00.0140.00916.62
7.4.330.0000.00415.55
7.4.320.0030.00316.63
7.4.300.0030.00316.39
7.4.290.0020.00516.52
7.4.280.0000.00716.59
7.4.270.0110.00316.51
7.4.260.0000.00716.53
7.4.250.0070.00016.46
7.4.240.0040.00416.52
7.4.230.0070.00016.34
7.4.220.0000.00716.53
7.4.210.0090.00716.59
7.4.200.0050.00316.34
7.4.160.0060.01016.53
7.4.140.0120.00717.86
7.4.130.0090.00916.72
7.4.120.0090.01116.45
7.4.110.0060.01416.53
7.4.100.0150.00316.58
7.4.90.0160.00316.45
7.4.80.0090.00919.39
7.4.70.0080.00916.45
7.4.60.0140.01016.47
7.4.50.0030.01216.62
7.4.40.0080.01216.64
7.4.00.0070.01114.82
7.3.330.0060.00013.35
7.3.320.0030.00313.33
7.3.310.0000.00716.39
7.3.300.0050.00216.26
7.3.290.0020.00516.40
7.3.280.0100.00516.33
7.3.260.0080.00916.62
7.3.240.0100.01016.40
7.3.230.0080.00916.42
7.3.210.0130.00316.76
7.3.200.0120.00316.33
7.3.190.0060.00916.38
7.3.180.0030.01316.59
7.3.170.0100.00616.32
7.3.160.0040.01116.47
7.3.10.0030.00816.46
7.3.00.0070.00416.48
7.2.330.0060.01216.90
7.2.320.0090.01216.86
7.2.310.0070.01116.63
7.2.300.0170.00016.49
7.2.290.0080.01516.44
7.2.130.0060.00616.99
7.2.120.0170.00316.50
7.2.110.0060.00616.68
7.2.100.0170.00016.86
7.2.90.0080.00816.49
7.2.80.0060.00616.73
7.2.70.0060.00916.83
7.2.60.0100.00916.90
7.2.50.0110.00615.91
7.2.40.0130.00516.76
7.2.30.0020.01016.80
7.2.20.0110.00616.68
7.2.10.0130.00616.79
7.2.00.0090.00916.91
7.1.250.0000.00815.76
7.1.200.0080.00815.76
7.1.170.0200.00014.08
7.1.160.0030.00915.70
7.1.150.0100.00715.84
7.1.140.0210.00014.04
7.1.130.0270.00315.56
7.1.120.0090.00615.48
7.1.110.0060.01315.58
7.1.100.0040.00815.64
7.1.90.0230.00314.05
7.1.80.0160.00813.95
7.1.70.0080.00915.77
7.1.60.0360.02133.64
7.1.50.0350.01033.47
7.1.40.0260.01233.37
7.1.30.0330.01033.63
7.1.20.0280.01633.39
7.1.10.0060.00915.78
7.1.00.0000.01415.81

preferences:
66.23 ms | 400 KiB | 5 Q