3v4l.org

run code in 300+ PHP versions simultaneously
<?php $givenArray = [ 'destination' => [ 'London', 'Liverpool', 'Nottingham', 'Oxford', ], 'fee' => [ 10, 15, 20, 25 ], ]; $output = []; foreach ($givenArray['destination'] as $key => $destination) { $fee = $givenArray['fee'][$key]; $output[] = [ 'destination' => $destination, 'fee' => $fee, 'status' => 1, ]; } print_r($output);

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.5.00.0130.00819.87
8.4.150.0030.00014.05
8.4.140.0110.01017.33
8.4.130.0120.00917.87
8.4.120.0110.00820.54
8.4.110.0050.00422.51
8.4.100.0120.00817.85
8.4.90.0120.00822.39
8.4.80.0090.01017.65
8.4.70.0040.00517.82
8.4.60.0090.01118.85
8.4.50.0110.01120.58
8.4.40.0150.00420.71
8.4.30.0080.01120.29
8.4.20.0120.00920.65
8.4.10.0030.00519.45
8.3.280.0150.00718.46
8.3.270.0080.01216.35
8.3.260.0130.00816.60
8.3.250.0100.00919.08
8.3.240.0090.00416.46
8.3.230.0100.01216.50
8.3.220.0100.00517.06
8.3.210.0090.00318.46
8.3.200.0050.00316.59
8.3.190.0090.00617.32
8.3.180.0080.01016.57
8.3.170.0150.00417.29
8.3.160.0030.01018.50
8.3.150.0030.00518.59
8.3.140.0060.00317.07
8.3.130.0050.00218.33
8.3.120.0000.00820.77
8.3.110.0110.00820.94
8.3.100.0090.00016.65
8.3.90.0060.00326.77
8.3.80.0050.00518.56
8.3.70.0120.00616.63
8.3.60.0180.00418.56
8.3.50.0120.00317.39
8.3.40.0100.00718.80
8.3.30.0060.00918.56
8.3.20.0070.00021.76
8.3.10.0040.00421.49
8.3.00.0040.00423.57
8.2.290.0060.00420.41
8.2.280.0120.00618.38
8.2.270.0060.00317.24
8.2.260.0040.00418.66
8.2.250.0060.00918.45
8.2.240.0030.00617.01
8.2.230.0050.00322.58
8.2.220.0000.00924.06
8.2.210.0090.00926.77
8.2.200.0030.00616.50
8.2.190.0070.01118.17
8.2.180.0110.00425.92
8.2.170.0070.00722.96
8.2.160.0070.01020.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00326.16
8.2.110.0070.00320.39
8.2.100.0090.00317.78
8.2.90.0030.00617.75
8.2.80.0080.00019.66
8.2.70.0040.00417.93
8.2.60.0030.00518.09
8.2.50.0060.00318.10
8.2.40.0050.00219.15
8.2.30.0040.00419.38
8.2.20.0040.00418.04
8.2.10.0040.00418.85
8.2.00.0020.00719.13
8.1.330.0090.00623.60
8.1.320.0120.00815.94
8.1.310.0030.01018.45
8.1.300.0060.00319.57
8.1.290.0090.00530.84
8.1.280.0030.01425.92
8.1.270.0060.00322.46
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00622.07
8.1.230.0040.00822.72
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0070.00417.13
8.1.190.0030.00617.36
8.1.180.0050.00318.10
8.1.170.0100.00018.46
8.1.160.0030.00518.80
8.1.150.0000.00818.93
8.1.140.0030.00518.80
8.1.130.0050.00520.17
8.1.120.0030.00617.34
8.1.110.0040.00417.34
8.1.100.0040.00417.47
8.1.90.0040.00417.47
8.1.80.0000.00817.36
8.1.70.0060.00317.50
8.1.60.0030.00517.52
8.1.50.0080.00317.52
8.1.40.0000.00917.48
8.1.30.0000.00917.63
8.1.20.0080.00017.48
8.1.10.0070.00017.38
8.1.00.0060.00317.46
8.0.300.0050.00219.46
8.0.290.0070.00016.63
8.0.280.0000.00718.55
8.0.270.0030.00317.26
8.0.260.0060.00018.44
8.0.250.0070.00016.86
8.0.240.0040.00416.93
8.0.230.0000.00716.96
8.0.220.0080.00016.79
8.0.210.0030.00316.98
8.0.200.0060.00016.94
8.0.190.0060.00316.96
8.0.180.0070.00016.81
8.0.170.0040.00816.95
8.0.160.0040.00416.87
8.0.150.0040.00416.71
8.0.140.0030.00316.81
8.0.130.0050.00013.32
8.0.120.0070.00016.89
8.0.110.0050.00316.91
8.0.100.0070.00016.76
8.0.90.0040.00416.67
8.0.80.0070.01016.90
8.0.70.0070.00016.84
8.0.60.0000.00716.75
8.0.50.0000.00716.76
8.0.30.0080.01116.82
8.0.20.0110.00916.85
8.0.10.0040.00416.89
8.0.00.0050.01416.63
7.4.330.0050.00015.55
7.4.320.0040.00416.58
7.4.300.0030.00316.53
7.4.290.0030.00316.49
7.4.280.0030.00616.61
7.4.270.0100.00016.56
7.4.260.0030.00316.38
7.4.250.0000.00716.54
7.4.240.0050.00216.54
7.4.230.0070.00016.58
7.4.220.0000.00716.44
7.4.210.0080.00916.52
7.4.200.0030.00516.53
7.4.160.0130.00416.43
7.4.140.0070.01317.86
7.4.130.0090.00916.52
7.4.120.0100.01416.48
7.4.110.0110.01116.57
7.4.100.0080.01316.45
7.4.90.0080.00916.64
7.4.80.0100.00719.39
7.4.70.0090.00616.64
7.4.60.0070.01316.49
7.4.50.0090.00316.42
7.4.40.0110.00616.53
7.4.00.0060.01214.88
7.3.330.0060.00013.12
7.3.320.0020.00213.14
7.3.310.0080.00016.22
7.3.300.0030.00316.13
7.3.290.0030.00316.25
7.3.280.0110.00316.25
7.3.260.0120.01416.41
7.3.230.0100.00716.29
7.3.210.0030.01316.23
7.3.200.0130.00716.36
7.3.190.0070.01316.19
7.3.180.0030.01316.44
7.3.170.0070.01616.17
7.3.160.0070.01016.44
7.3.120.0050.01114.65
7.3.110.0100.00714.54
7.3.100.0050.01114.89
7.3.90.0030.01214.96
7.3.80.0050.00914.89
7.3.70.0070.00714.77
7.3.60.0050.00914.85
7.3.50.0080.00514.86
7.3.40.0100.00514.75
7.3.30.0060.01014.70
7.3.20.0130.00616.56
7.3.10.0110.00816.52
7.3.00.0080.00516.69
7.2.330.0100.00716.79
7.2.320.0070.01416.45
7.2.310.0130.00316.69
7.2.300.0120.00616.74
7.2.290.0150.00916.41
7.2.250.0050.01115.13
7.2.240.0050.01414.96
7.2.230.0080.00715.14
7.2.220.0080.00915.10
7.2.210.0070.00815.25
7.2.200.0050.01114.88
7.2.190.0110.00315.00
7.2.180.0080.00815.17
7.2.170.0060.00615.01
7.2.160.0040.01015.21
7.2.150.0040.01116.98
7.2.140.0040.01416.86
7.2.130.0200.00017.01
7.2.120.0120.00316.80
7.2.110.0270.00316.71
7.2.100.0110.01116.82
7.2.90.0080.01216.76
7.2.80.0180.00417.10
7.2.70.0130.00816.87
7.2.60.0130.01016.62
7.2.50.0110.00816.56
7.2.40.0040.01516.87
7.2.30.0150.00816.99
7.2.20.0050.00816.95
7.2.10.0090.01316.76
7.2.00.0110.00616.95
7.1.330.0020.01415.85
7.1.320.0080.00415.71
7.1.310.0060.00715.71
7.1.300.0100.00915.60
7.1.290.0100.00515.65
7.1.280.0090.00915.63
7.1.270.0110.00615.56
7.1.260.0040.00915.65
7.1.250.0140.00315.77

preferences:
30.55 ms | 403 KiB | 5 Q