3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'product_template_id' => [ '0' => '1', '1' => '2' ], 'amount' => [ '0' => '50', '1' => '100' ] ]; $arr = []; for ($x = 0; $x <= count($array['amount']); $x ++) { $arr[$x] = [ 'product_template_id' => $array['product_template_id'][$x], 'amount' => $array['amount'][$x], ]; } var_dump($arr);

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.0040.01416.63
8.3.50.0070.01018.13
8.3.40.0180.00318.75
8.3.30.0060.00918.67
8.3.20.0040.00420.34
8.3.10.0050.00321.85
8.3.00.0040.00421.70
8.2.180.0130.00618.54
8.2.170.0100.01022.96
8.2.160.0070.01021.01
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00820.52
8.2.120.0090.00026.35
8.2.110.0080.00320.60
8.2.100.0100.00317.89
8.2.90.0000.00819.21
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0090.00017.93
8.2.50.0080.00018.10
8.2.40.0040.00422.07
8.2.30.0040.00419.32
8.2.20.0000.00818.12
8.2.10.0050.00318.15
8.2.00.0000.00718.26
8.1.280.0130.00725.92
8.1.270.0000.00520.70
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00423.92
8.1.230.0080.00317.83
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00420.23
8.1.160.0080.00018.89
8.1.150.0030.00521.92
8.1.140.0000.00719.50
8.1.130.0050.00318.98
8.1.120.0030.00317.46
8.1.110.0060.00317.42
8.1.100.0000.00817.49
8.1.90.0050.00217.50
8.1.80.0020.00517.43
8.1.70.0030.00317.43
8.1.60.0040.00417.61
8.1.50.0000.00817.56
8.1.40.0040.00717.50
8.1.30.0080.00017.57
8.1.20.0040.00417.65
8.1.10.0040.00417.45
8.1.00.0030.00617.44
8.0.300.0060.00318.77
8.0.290.0060.00316.63
8.0.280.0000.00818.28
8.0.270.0050.00317.15
8.0.260.0030.00317.12
8.0.250.0030.00317.00
8.0.240.0070.00316.84
8.0.230.0040.00416.88
8.0.220.0030.00316.94
8.0.210.0030.00516.85
8.0.200.0030.00316.91
8.0.190.0070.00017.01
8.0.180.0020.00516.89
8.0.170.0040.00416.93
8.0.160.0000.00916.80
8.0.150.0040.00416.89
8.0.140.0000.00716.94
8.0.130.0030.00313.34
8.0.120.0030.00516.92
8.0.110.0000.00817.02
8.0.100.0030.00616.84
8.0.90.0040.00416.99
8.0.80.0120.00616.95
8.0.70.0070.00316.89
8.0.60.0040.00416.79
8.0.50.0050.00316.74
8.0.30.0110.00817.06
8.0.20.0110.00917.40
8.0.10.0000.00816.97
8.0.00.0120.00616.74
7.4.330.0050.00015.55
7.4.320.0060.00016.52
7.4.300.0030.00316.57
7.4.290.0030.00716.43
7.4.280.0000.00816.55
7.4.270.0000.00716.60
7.4.260.0000.00916.64
7.4.250.0040.00316.57
7.4.240.0000.00716.46
7.4.230.0070.00016.64
7.4.220.0110.00716.41
7.4.210.0110.00316.48
7.4.200.0040.00416.63
7.4.160.0030.01316.34
7.4.150.0220.00417.40
7.4.140.0090.01017.86
7.4.130.0090.00916.47
7.4.120.0120.01016.42
7.4.110.0090.00916.42
7.4.100.0120.00916.60
7.4.90.0100.01016.53
7.4.80.0140.00719.39
7.4.70.0030.01516.49
7.4.60.0090.00616.46
7.4.50.0060.00616.49
7.4.40.0100.00716.49
7.4.30.0100.00816.53
7.4.00.0100.00714.71
7.3.330.0050.00313.32
7.3.320.0050.00013.24
7.3.310.0030.00316.32
7.3.300.0030.00316.38
7.3.290.0080.00616.43
7.3.280.0080.00916.37
7.3.270.0000.01717.40
7.3.260.0110.00716.50
7.3.250.0100.00916.43
7.3.240.0110.00616.57
7.3.230.0090.00916.67
7.3.210.0030.01416.46
7.3.200.0140.00716.32
7.3.190.0120.00916.34
7.3.180.0130.00916.45
7.3.170.0060.01216.41
7.3.160.0090.00916.66
7.2.330.0040.01316.67
7.2.320.0110.00616.51
7.2.310.0110.00816.66
7.2.300.0100.01016.44
7.2.290.0150.00416.74
7.2.110.0070.01016.46
7.2.60.0060.00816.91
7.2.00.0070.00719.45
7.1.200.0090.00615.81
7.1.70.0060.00317.05
7.1.60.0030.00716.92
7.1.50.0140.01016.85
7.1.40.0230.01034.35
7.1.30.0270.00734.34
7.1.20.0200.00734.40
7.1.10.0030.01316.27
7.1.00.0130.00316.51
7.0.200.0180.00716.82
7.0.180.0030.01015.97
7.0.170.0030.00716.09
7.0.160.0000.01016.31
7.0.150.0100.00715.96
7.0.140.0000.01316.17
7.0.130.0030.01316.49
7.0.120.0030.01316.25
7.0.110.0030.01016.00
7.0.100.0030.01016.41
7.0.90.0030.01016.23
7.0.80.0030.01016.29
7.0.70.0070.00716.36
7.0.60.0030.01016.21
7.0.50.0030.01016.29
7.0.40.0000.01316.41
7.0.30.0030.01016.36
7.0.20.0030.01316.35
7.0.10.0030.01016.14
7.0.00.0070.00716.34

preferences:
63.64 ms | 401 KiB | 5 Q