3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = [210, 11, 12]; $operators = ['-', '/']; $result = (array)($numbers[0] ?? []); foreach ($operators as $i => $operator) { array_push($result, $operator, $numbers[++$i]); } var_export($result); var_export( array_reduce( $operators, function($result, $value) use($numbers) { static $i = 0; array_push($result, $value, $numbers[++$i]); return $result; }, (array)($numbers[0] ?? []) ) );

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.4.120.0100.00920.39
8.4.110.0100.00718.88
8.4.100.0120.00917.73
8.4.90.0090.00820.57
8.4.80.0100.00418.89
8.4.70.0090.00820.52
8.4.60.0080.00819.07
8.4.50.0130.00718.89
8.4.40.0100.01019.62
8.4.30.0040.01520.43
8.4.20.0100.01017.97
8.4.10.0060.00321.89
8.3.250.0120.00719.03
8.3.240.0110.00816.80
8.3.230.0110.00816.73
8.3.220.0100.00918.95
8.3.210.0090.00516.80
8.3.200.0050.00416.57
8.3.190.0120.00817.09
8.3.180.0100.00819.17
8.3.170.0060.01217.33
8.3.160.0110.00716.42
8.3.150.0120.00617.28
8.3.140.0090.00620.68
8.3.130.0100.00016.64
8.3.120.0060.00320.73
8.3.110.0030.00520.94
8.3.100.0000.00916.59
8.3.90.0090.00618.59
8.3.80.0040.00818.27
8.3.70.0110.01116.88
8.3.60.0140.00718.55
8.3.50.0060.01320.00
8.3.40.0110.00718.85
8.3.30.0120.00319.26
8.3.20.0000.00924.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.290.0100.00820.80
8.2.280.0040.00418.19
8.2.270.0110.00716.59
8.2.260.0140.00317.25
8.2.250.0070.01118.30
8.2.240.0000.01019.17
8.2.230.0080.00022.58
8.2.220.0000.00824.06
8.2.210.0170.00326.77
8.2.200.0060.00316.25
8.2.190.0040.01216.72
8.2.180.0090.00625.92
8.2.170.0120.00319.09
8.2.160.0080.00822.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0060.00320.34
8.2.100.0040.00817.88
8.2.90.0060.00317.75
8.2.80.0080.00018.82
8.2.70.0050.00317.63
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0040.00420.01
8.2.30.0040.00418.20
8.2.20.0050.00320.31
8.2.10.0050.00318.01
8.2.00.0000.00819.20
8.1.330.0120.00721.67
8.1.320.0150.00816.22
8.1.310.0070.00716.68
8.1.300.0060.00318.23
8.1.290.0080.00318.88
8.1.280.0190.00025.92
8.1.270.0030.00623.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0120.00819.02
8.1.230.0040.00817.77
8.1.220.0030.00517.77
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.47
8.1.160.0050.00318.81
8.1.150.0000.00818.60
8.1.140.0030.00717.46
8.1.130.0030.00318.82
8.1.120.0000.00717.36
8.1.110.0020.00517.46
8.1.100.0070.00017.48
8.1.90.0000.00817.35
8.1.80.0040.00417.51
8.1.70.0000.00717.50
8.1.60.0040.00417.60
8.1.50.0210.00317.37
8.1.40.0070.01117.48
8.1.30.0060.00817.61
8.1.20.0170.00017.58
8.1.10.0140.00417.50
8.1.00.0110.00717.33
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0040.00418.39
8.0.270.0070.00018.08
8.0.260.0000.00718.35
8.0.250.0030.00516.86
8.0.240.0030.00516.85
8.0.230.0030.00316.95
8.0.220.0000.00716.86
8.0.210.0000.00716.88
8.0.200.0030.00316.89
8.0.190.0040.00416.89
8.0.180.0130.00316.89
8.0.170.0190.00516.79
8.0.160.0100.00316.78
8.0.150.0140.00716.86
8.0.140.0120.00416.74
8.0.130.0150.00616.83
8.0.120.0140.00516.63
8.0.110.0160.00416.86
8.0.100.0000.00716.76
8.0.90.0140.00516.77
8.0.80.0130.00416.82
8.0.70.0200.00016.69
8.0.60.0170.00316.73
8.0.50.0130.00516.73
8.0.30.0160.00716.68
8.0.20.0150.00616.86
8.0.10.0150.00416.90
7.4.330.0020.00215.55
7.4.320.0030.00316.59
7.4.300.0060.00016.50
7.4.290.0150.00016.38
7.4.280.0150.00816.46
7.4.270.0090.00916.37
7.4.260.0140.00316.43
7.4.250.0160.00016.43
7.4.240.0070.00716.45
7.4.230.0060.00616.47
7.4.220.0140.00016.56
7.4.210.0130.00516.34
7.4.200.0140.00716.58
7.4.190.0060.00616.43
7.4.180.0130.00016.58
7.4.160.0120.00016.55
7.4.150.0080.00416.33
7.4.140.0100.00316.27
7.4.130.0150.00316.38
7.4.120.0150.00316.35
7.4.110.0060.01216.38
7.4.100.0090.00916.43
7.4.90.0150.00816.35
7.4.80.0190.00016.43
7.4.70.0130.00616.49
7.4.60.0200.00016.32
7.4.50.0190.00016.35
7.4.40.0200.00316.14
7.4.30.0120.00616.26
7.4.20.0160.00016.29
7.4.10.0150.00316.44
7.4.00.0180.00016.32

preferences:
28.36 ms | 403 KiB | 5 Q