3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => [ 'id' => 123-456-000-000, 'name' => 'john' ], 1 => [ 'id' => 123-456-789-014, 'name' => 'james' ] ]; $arr1 = [ 0 => [ 'id' => 123-456-000-000, 'address' => 'Japan' ], 1 => [ 'id' => 123-456-789-014, 'address' => 'Spain' ] ]; foreach ($arr1 as $key => $inner) { $arr1[$key]["address"] = $inner["address"]; } print_r(arr1);

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.0110.00416.75
8.3.50.0070.01122.01
8.3.40.0040.01118.79
8.3.30.0140.00018.87
8.3.20.0040.00420.33
8.3.10.0110.00723.48
8.3.00.0040.00419.79
8.2.180.0080.00816.63
8.2.170.0150.00322.96
8.2.160.0060.00920.47
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0060.00319.51
8.2.120.0000.00826.35
8.2.110.0030.00619.27
8.2.100.0120.00017.91
8.2.90.0030.00517.88
8.2.80.0040.00418.93
8.2.70.0040.00417.75
8.2.60.0080.00019.48
8.2.50.0060.00317.75
8.2.40.0070.00317.75
8.2.30.0000.00720.49
8.2.20.0000.00817.86
8.2.10.0060.00318.17
8.2.00.0040.00418.02
8.1.280.0000.01425.92
8.1.270.0040.00420.38
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00419.21
8.1.230.0030.00817.89
8.1.220.0030.00517.77
8.1.210.0000.00818.77
8.1.200.0000.00817.48
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0030.00518.96
8.1.160.0040.00420.75
8.1.150.0040.00418.89
8.1.140.0000.00819.47
8.1.130.0090.00017.58
8.1.120.0070.00017.36
8.1.110.0030.00517.47
8.1.100.0040.00417.46
8.1.90.0050.00217.48
8.1.80.0000.00817.43
8.1.70.0050.00317.32
8.1.60.0060.00317.57
8.1.50.0030.00517.51
8.1.40.0040.00417.50
8.1.30.0000.00917.63
8.1.20.0050.00317.68
8.1.10.0050.00217.57
8.1.00.0040.00717.39
8.0.300.0040.00418.77
8.0.290.0030.00616.88
8.0.280.0080.00018.55
8.0.270.0000.00717.15
8.0.260.0030.00317.13
8.0.250.0030.00316.91
8.0.240.0000.00716.98
8.0.230.0040.00416.99
8.0.220.0030.00316.84
8.0.210.0000.00716.85
8.0.200.0000.00616.97
8.0.190.0030.00517.00
8.0.180.0040.00416.97
8.0.170.0040.00416.95
8.0.160.0040.00416.97
8.0.150.0000.00816.95
8.0.140.0000.00716.94
8.0.130.0000.00513.37
8.0.120.0030.00516.91
8.0.110.0040.00416.84
8.0.100.0030.00316.97
8.0.90.0000.00816.81
8.0.80.0120.00316.95
8.0.70.0040.00416.86
8.0.60.0080.00016.72
8.0.50.0000.00717.00
8.0.30.0130.00717.08
8.0.20.0100.00917.40
8.0.10.0030.00516.94
8.0.00.0090.00916.77
7.4.330.0000.00516.71
7.4.320.0000.00616.50
7.4.300.0040.00416.52
7.4.290.0030.00516.54
7.4.280.0080.00016.48
7.4.270.0000.00816.59
7.4.260.0030.00316.60
7.4.250.0050.00316.46
7.4.240.0020.00516.60
7.4.230.0000.00716.55
7.4.220.0130.01016.43
7.4.210.0100.00416.61
7.4.200.0000.00716.58
7.4.150.0210.00317.40
7.4.140.0100.00717.86
7.4.130.0080.01516.78
7.4.120.0120.00516.57
7.4.110.0100.00716.38
7.4.100.0130.01016.61
7.4.90.0100.00716.55
7.4.80.0120.00619.39
7.4.70.0090.00916.46
7.4.60.0060.00916.57
7.4.50.0060.00916.35
7.4.40.0120.00316.40
7.4.30.0060.01216.62
7.4.10.0030.01515.23
7.4.00.0070.00815.11
7.3.330.0030.00313.27
7.3.320.0050.00013.30
7.3.310.0070.00016.32
7.3.300.0000.00716.39
7.3.290.0000.00716.38
7.3.280.0080.00716.41
7.3.270.0140.00417.40
7.3.260.0140.00316.37
7.3.250.0110.00916.43
7.3.240.0110.01016.50
7.3.230.0090.00616.39
7.3.210.0090.00916.61
7.3.200.0140.00716.46
7.3.190.0090.00616.42
7.3.180.0070.01116.38
7.3.170.0150.01016.34
7.3.160.0070.01016.46
7.3.130.0090.00914.99
7.3.120.0080.00914.79
7.3.110.0050.01114.90
7.3.100.0040.00914.79
7.3.90.0030.00914.73
7.3.80.0040.00914.72
7.3.70.0040.00814.95
7.3.60.0090.00314.82
7.3.50.0080.00714.71
7.3.40.0070.00714.67
7.3.30.0070.00714.71
7.3.20.0070.00716.56
7.3.10.0080.00816.63
7.3.00.0120.00516.73
7.2.330.0040.01216.48
7.2.320.0120.00616.75
7.2.310.0070.01016.63
7.2.300.0040.01216.55
7.2.290.0030.01916.73
7.2.260.0130.00314.95
7.2.250.0090.00914.81
7.2.240.0090.00615.10
7.2.230.0090.00715.14
7.2.220.0050.01014.98
7.2.210.0050.00815.22
7.2.200.0040.00815.13
7.2.190.0050.00914.89
7.2.180.0020.01015.04
7.2.170.0070.00714.96
7.2.160.0050.00714.98
7.2.150.0080.00616.92
7.2.140.0100.00516.88
7.2.130.0070.00816.82
7.2.120.0110.00716.79
7.2.110.0060.00916.82
7.2.100.0050.01016.78
7.2.90.0090.00716.77
7.2.80.0070.00816.78
7.2.70.0070.00516.76
7.2.60.0090.00716.73
7.2.50.0090.00516.76
7.2.40.0090.00716.67
7.2.30.0070.00916.81
7.2.20.0090.01216.82
7.2.10.0110.00716.69
7.2.00.0080.00517.44
7.1.330.0030.01015.82
7.1.320.0060.00815.85
7.1.310.0030.01015.90
7.1.300.0060.00815.60
7.1.290.0030.01015.76
7.1.280.0030.00715.71
7.1.270.0050.00515.69
7.1.260.0050.00915.89
7.1.250.0030.01015.73
7.1.240.0070.00715.89
7.1.230.0040.00815.61
7.1.220.0080.00815.86
7.1.210.0030.00915.79
7.1.200.0020.01115.72
7.1.190.0040.00815.85
7.1.180.0040.01415.83
7.1.170.0070.01015.63
7.1.160.0070.00416.02
7.1.150.0040.01115.87
7.1.140.0060.00615.88
7.1.130.0060.00615.79
7.1.120.0140.00015.93
7.1.110.0100.00715.91
7.1.100.0080.00617.00
7.1.90.0060.00315.76
7.1.80.0060.00615.92
7.1.70.0050.00816.54
7.1.60.0050.01217.65
7.1.50.0070.01016.58
7.1.40.0100.00315.69
7.1.30.0070.00415.79
7.1.20.0100.00315.62
7.1.10.0050.00515.69
7.1.00.0030.04219.18
7.0.330.0000.00915.39
7.0.320.0030.01315.41
7.0.310.0070.00715.10
7.0.300.0090.00615.52
7.0.290.0070.00715.39
7.0.280.0100.00315.38
7.0.270.0030.01015.18
7.0.260.0080.00415.48
7.0.250.0040.00715.22
7.0.240.0030.00615.40
7.0.230.0060.00315.23
7.0.220.0040.00815.38
7.0.210.0080.00415.51
7.0.200.0080.00616.13
7.0.190.0060.00615.30
7.0.180.0070.00715.56
7.0.170.0060.00915.28
7.0.160.0070.00715.28
7.0.150.0030.01015.43
7.0.140.0130.00615.36
7.0.130.0060.00315.21
7.0.120.0060.00915.14
7.0.110.0030.01015.40
7.0.100.0150.00315.34
7.0.90.0040.00815.43
7.0.80.0000.01115.20
7.0.70.0110.00015.36
7.0.60.0060.02817.72
7.0.50.0030.02816.71
7.0.40.0070.02216.80
7.0.30.0150.02416.77
7.0.20.0130.03216.82
7.0.10.0050.04916.72
7.0.00.0020.02816.83
5.6.400.0070.00714.50
5.6.390.0080.00814.65
5.6.380.0060.00914.79
5.6.370.0100.00614.25
5.6.360.0100.00614.46
5.6.350.0030.01014.43
5.6.340.0000.01314.51
5.6.330.0030.00714.11
5.6.320.0040.01114.61
5.6.310.0070.00714.58
5.6.300.0070.01314.58
5.6.290.0050.00314.53
5.6.280.0040.03417.82
5.6.270.0000.01514.22
5.6.260.0090.00914.37
5.6.250.0000.00914.43
5.6.240.0030.01014.60
5.6.230.0100.00614.53
5.6.220.0000.01314.56
5.6.210.0080.02017.52
5.6.200.0070.04316.31
5.6.190.0070.04117.35
5.6.180.0150.03317.42
5.6.170.0230.03717.56
5.6.160.0070.04217.44
5.6.150.0050.03516.36
5.6.140.0050.02316.32
5.6.130.0070.02316.25
5.6.120.0030.02717.83
5.6.110.0030.02417.65
5.6.100.0080.04017.62
5.6.90.0110.04117.80
5.6.80.0030.04117.45
5.6.70.0040.00714.44
5.6.60.0060.00614.29
5.6.50.0090.00314.38
5.6.40.0040.00714.25
5.6.30.0060.00614.37
5.6.20.0070.00714.46
5.6.10.0040.00714.25
5.6.00.0080.00514.57
5.5.380.0030.00614.64
5.5.370.0030.01314.14
5.5.360.0070.00414.65
5.5.350.0200.03317.50
5.5.340.0050.04916.10
5.5.330.0070.04217.34
5.5.320.0330.04017.39
5.5.310.0160.02417.38
5.5.300.0050.04316.07
5.5.290.0140.03716.15
5.5.280.0110.04017.51
5.5.270.0050.02417.76
5.5.260.0050.04317.51
5.5.250.0080.04317.26
5.5.240.2070.02017.37
5.5.230.0030.01013.99
5.5.220.0040.01114.43
5.5.210.0060.00914.11
5.5.200.0070.00414.09
5.5.190.0030.01014.05
5.5.180.0100.00014.21
5.5.170.0150.00014.39
5.5.160.0030.01214.23
5.5.150.0070.00714.66
5.5.140.0130.00014.26
5.5.130.0030.01014.21
5.5.120.0100.00714.52
5.5.110.0070.00714.30
5.5.100.0030.01014.22
5.5.90.0040.01114.30
5.5.80.0060.00614.32
5.5.70.0040.01114.32
5.5.60.0030.00913.78
5.5.50.0000.00814.45
5.5.40.0090.00313.91
5.5.30.0090.00614.30
5.5.20.0060.00314.13
5.5.10.0040.01214.12
5.5.00.0000.00914.11

preferences:
99.48 ms | 401 KiB | 5 Q