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['produc_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.0180.00316.88
8.3.50.0090.01122.11
8.3.40.0070.00718.59
8.3.30.0150.00318.67
8.3.20.0080.00020.34
8.3.10.0040.00421.96
8.3.00.0050.00321.77
8.2.180.0090.00918.54
8.2.170.0100.00722.96
8.2.160.0060.00920.92
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00520.47
8.2.120.0040.00426.16
8.2.110.0070.00320.90
8.2.100.0120.00018.09
8.2.90.0080.00019.22
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0050.00322.18
8.2.30.0000.00819.30
8.2.20.0000.00718.15
8.2.10.0000.00718.34
8.2.00.0040.00418.24
8.1.280.0170.00325.92
8.1.270.0060.00322.14
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0040.00423.88
8.1.230.0040.00820.62
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0090.00017.48
8.1.190.0030.00617.53
8.1.180.0030.00618.10
8.1.170.0060.00318.62
8.1.160.0040.00418.88
8.1.150.0040.00420.15
8.1.140.0000.00719.49
8.1.130.0030.00319.12
8.1.120.0040.00417.50
8.1.110.0050.00217.44
8.1.100.0000.00817.48
8.1.90.0040.00417.51
8.1.80.0030.00617.43
8.1.70.0030.00317.47
8.1.60.0040.00417.59
8.1.50.0040.00417.51
8.1.40.0030.00617.57
8.1.30.0000.00817.61
8.1.20.0000.00717.55
8.1.10.0000.00817.54
8.1.00.0030.00917.53
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0000.00718.30
8.0.270.0070.00017.07
8.0.260.0030.00317.21
8.0.250.0030.00316.89
8.0.240.0070.00416.87
8.0.230.0070.00016.95
8.0.220.0070.00016.85
8.0.210.0070.00016.87
8.0.200.0060.00016.99
8.0.190.0040.00416.93
8.0.180.0040.00416.88
8.0.170.0030.00416.99
8.0.160.0000.00816.85
8.0.150.0040.00416.78
8.0.140.0040.00416.80
8.0.130.0000.00613.37
8.0.120.0040.00416.80
8.0.110.0000.00816.89
8.0.100.0040.00417.01
8.0.90.0040.00417.02
8.0.80.0110.00616.91
8.0.70.0060.00316.96
8.0.60.0000.00816.96
8.0.50.0080.00016.85
8.0.30.0090.00917.00
8.0.20.0100.01117.40
8.0.10.0040.00417.02
8.0.00.0160.00716.67
7.4.330.0000.00515.55
7.4.320.0060.00016.54
7.4.300.0000.00716.52
7.4.290.0060.00616.61
7.4.280.0040.00416.59
7.4.270.0060.00016.41
7.4.260.0060.00616.54
7.4.250.0040.00416.56
7.4.240.0030.00316.60
7.4.230.0070.00016.34
7.4.220.0100.00616.55
7.4.210.0090.00616.52
7.4.200.0030.00316.55
7.4.160.0080.00916.50
7.4.150.0160.00817.40
7.4.140.0090.01117.86
7.4.130.0090.00816.60
7.4.120.0080.01416.50
7.4.110.0100.01316.61
7.4.100.0120.00616.61
7.4.90.0100.01016.30
7.4.80.0120.00619.39
7.4.70.0000.01716.42
7.4.60.0250.01216.55
7.4.50.0030.00816.45
7.4.40.0080.00816.65
7.4.30.0100.00816.64
7.4.00.0120.00315.15
7.3.330.0070.00213.15
7.3.320.0000.00513.25
7.3.310.0070.00016.22
7.3.300.0030.00316.35
7.3.290.0040.01016.42
7.3.280.0110.00716.37
7.3.270.0120.00817.40
7.3.260.0140.01016.49
7.3.250.0090.00816.40
7.3.240.0100.01016.42
7.3.230.0130.00316.47
7.3.210.0080.01016.49
7.3.200.0070.01416.35
7.3.190.0100.01016.65
7.3.180.0090.01216.40
7.3.170.0120.00616.42
7.3.160.0140.00916.51
7.3.10.0070.00716.89
7.3.00.0080.00816.74
7.2.330.0060.01216.41
7.2.320.0060.01116.36
7.2.310.0150.00416.61
7.2.300.0090.01016.74
7.2.290.0030.01316.79
7.2.130.0080.00816.86
7.2.120.0040.01216.96
7.2.110.0070.00316.72
7.2.100.0060.00917.00
7.2.90.0060.01016.80
7.2.80.0030.00616.93
7.2.70.0090.00616.93
7.2.60.0020.01116.90
7.2.50.0080.00416.78
7.2.40.0000.01416.90
7.2.30.0000.01016.69
7.2.20.0060.00316.88
7.2.10.0060.00616.91
7.2.00.0090.00518.08
7.1.250.0030.01015.97
7.1.200.0060.00615.96
7.1.70.0040.00417.07
7.1.60.0080.00317.15
7.1.50.0100.01317.11
7.1.40.0130.01734.38
7.1.30.0170.01734.41
7.1.20.0130.02034.69
7.1.10.0070.01316.39
7.1.00.0000.01316.74
7.0.200.0110.01116.88
7.0.180.0070.00716.23
7.0.170.0030.01316.21
7.0.160.0030.01016.11
7.0.150.0000.01016.32
7.0.140.0070.00716.21
7.0.130.0000.01316.65
7.0.120.0030.01316.38
7.0.110.0000.01716.16
7.0.100.0030.01016.29
7.0.90.0030.01016.14
7.0.80.0000.01716.21
7.0.70.0030.01716.11
7.0.60.0070.01015.84
7.0.50.0000.01716.43
7.0.40.0000.02016.45
7.0.30.0030.01316.57
7.0.20.0070.01016.30
7.0.10.0100.00316.37
7.0.00.0000.01316.38

preferences:
44.18 ms | 401 KiB | 5 Q