3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "errors": [ [ { "id": "login1", "error": "Invalid" }, { "id": "login2", "error": "Invalid" }, { "id": "login3", "error": "Invalid" } ], [], [ { "id": "login10", "error": "Invalid" }, { "id": "login11", "error": "Invalid" } ] ] }'; $array = json_decode($json, true); $errors = []; foreach($array['errors'] AS $subarray) { $errors = array_merge_recursive($errors, $subarray); } print_r($errors);

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.10.0040.00520.07
8.5.00.0100.01119.84
8.4.160.0150.00623.04
8.4.150.0030.00014.05
8.4.140.0110.01017.37
8.4.130.0080.00117.72
8.4.120.0100.01020.41
8.4.110.0120.00822.32
8.4.100.0110.00919.24
8.4.90.0040.00518.62
8.4.80.0120.00817.73
8.4.70.0100.00618.00
8.4.60.0120.00818.62
8.4.50.0090.00617.52
8.4.40.0130.00620.12
8.4.30.0130.00717.49
8.4.20.0030.01717.42
8.4.10.0130.00317.40
8.3.280.0130.00818.20
8.3.270.0120.00716.34
8.3.260.0130.00616.35
8.3.250.0120.00718.71
8.3.240.0090.01319.10
8.3.230.0130.00716.37
8.3.220.0140.00617.32
8.3.210.0090.01116.71
8.3.200.0090.01016.39
8.3.190.0050.00418.88
8.3.180.0040.00518.37
8.3.170.0180.00019.10
8.3.160.0120.00618.41
8.3.150.0150.00420.58
8.3.140.0000.00916.38
8.3.130.0090.00018.26
8.3.120.0040.00418.86
8.3.110.0030.00520.94
8.3.100.0060.00324.06
8.3.90.0040.01126.77
8.3.80.0000.00918.30
8.3.70.0080.00818.18
8.3.60.0140.00316.48
8.3.50.0100.00522.81
8.3.40.0120.00318.53
8.3.30.0000.01418.39
8.3.20.0040.00420.11
8.3.10.0080.00021.93
8.3.00.0030.00519.21
8.2.290.0140.00520.67
8.2.280.0140.00518.43
8.2.270.0120.00617.03
8.2.260.0070.00718.13
8.2.250.0070.00316.47
8.2.240.0060.00316.96
8.2.230.0070.00322.58
8.2.220.0070.00437.54
8.2.210.0030.00526.77
8.2.200.0030.00718.17
8.2.190.0140.00016.58
8.2.180.0120.00918.14
8.2.170.0040.01122.96
8.2.160.0040.01119.15
8.2.150.0070.00724.18
8.2.140.0040.00424.66
8.2.130.0070.00020.51
8.2.120.0040.00426.35
8.2.110.0100.00722.25
8.2.100.0080.00417.91
8.2.90.0000.00817.75
8.2.80.0040.00418.92
8.2.70.0040.00417.63
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0170.00017.83
8.2.30.0100.00018.00
8.2.20.0040.00417.75
8.2.10.0030.00618.13
8.2.00.0040.00418.08
8.1.330.0140.00621.86
8.1.320.0130.00916.10
8.1.310.0000.00818.25
8.1.300.0030.00619.56
8.1.290.0070.00318.88
8.1.280.0120.00625.92
8.1.270.0050.00323.77
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0110.00020.23
8.1.230.0080.00317.77
8.1.220.0090.00017.91
8.1.210.0040.00418.77
8.1.200.0000.00817.22
8.1.190.0040.00417.10
8.1.180.0030.00518.10
8.1.170.0000.00818.71
8.1.160.0040.00418.80
8.1.150.0000.00718.85
8.1.140.0000.00719.68
8.1.130.0000.00717.62
8.1.120.0020.00517.51
8.1.110.0060.00317.46
8.1.100.0070.00017.37
8.1.90.0040.00317.37
8.1.80.0000.00817.36
8.1.70.0000.00717.41
8.1.60.0050.00317.55
8.1.50.0090.00017.49
8.1.40.0080.00017.41
8.1.30.0000.00917.50
8.1.20.0030.00517.68
8.1.10.0030.00617.56
8.1.00.0050.00317.47
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.43
8.0.270.0040.00417.30
8.0.260.0030.00317.13
8.0.250.0050.00216.95
8.0.240.0000.00717.00
8.0.230.0000.00616.97
8.0.220.0000.00716.80
8.0.210.0030.00316.89
8.0.200.0060.00017.02
8.0.190.0000.00716.96
8.0.180.0000.00716.83
8.0.170.0060.00316.93
8.0.160.0000.00716.93
8.0.150.0020.00516.92
8.0.140.0000.00716.81
8.0.130.0030.00313.36
8.0.120.0080.00016.76
8.0.110.0050.00316.80
8.0.100.0040.00416.68
8.0.90.0040.00416.77
8.0.80.0100.01016.88
8.0.70.0080.00016.74
8.0.60.0040.00416.90
8.0.50.0000.00716.94
8.0.30.0130.00617.18
8.0.20.0140.00917.40
8.0.10.0070.00017.00
8.0.00.0030.01316.70
7.4.330.0050.00015.08
7.4.320.0030.00316.62
7.4.300.0000.00616.52
7.4.290.0070.00016.40
7.4.280.0030.00616.64
7.4.270.0000.00616.49
7.4.260.0000.00716.58
7.4.250.0000.00816.57
7.4.240.0030.00316.46
7.4.230.0000.00716.39
7.4.220.0160.00016.49
7.4.210.0120.00916.45
7.4.200.0030.00316.63
7.4.160.0080.00816.73
7.4.150.0190.00017.40
7.4.140.0070.01017.86
7.4.130.0090.01116.53
7.4.120.0100.00716.49
7.4.110.0030.01316.38
7.4.100.0060.01216.43
7.4.90.0080.00916.62
7.4.80.0130.00319.39
7.4.70.0120.00916.27
7.4.60.0110.00616.44
7.4.50.0030.00716.34
7.4.40.0090.01516.43
7.4.30.0090.00616.23
7.4.00.0120.00615.11
7.3.330.0080.00013.03
7.3.320.0000.00613.11
7.3.310.0030.00316.20
7.3.300.0070.00016.24
7.3.290.0080.00816.22
7.3.280.0080.00616.21
7.3.270.0080.00817.40
7.3.260.0110.01016.48
7.3.250.0120.00816.25
7.3.240.0080.01116.35
7.3.230.0110.00716.41
7.3.210.0130.00316.40
7.3.200.0060.01516.37
7.3.190.0020.00116.50
7.3.180.0100.00816.29
7.3.170.0060.01016.33
7.3.160.0080.00816.21
7.2.330.0110.00816.35
7.2.320.0060.01216.62
7.2.310.0090.00916.45
7.2.300.0100.00616.54
7.2.290.0060.01016.70
7.2.60.0060.00916.78
7.2.00.0040.01119.48
7.1.200.0080.00815.40
7.1.70.0030.00317.23
7.1.60.0000.01519.90
7.1.00.0000.07722.36
7.0.200.0030.00914.60
7.0.70.0770.05719.91
7.0.60.0070.06019.96
7.0.50.0270.07720.39
7.0.40.0130.06020.22
7.0.30.0130.06320.32
7.0.20.0300.05020.32
7.0.10.0130.06320.31
7.0.00.0230.05320.21
5.6.280.0100.06321.09
5.6.220.0230.06320.72
5.6.210.0200.06320.78
5.6.200.0270.06020.96
5.6.190.0230.05321.07
5.6.180.0130.06021.13
5.6.170.0200.05720.95
5.6.160.0230.05020.97
5.6.150.0200.05721.04
5.6.140.0130.06021.07
5.6.130.0230.05721.12
5.6.120.0330.05021.10
5.6.110.0300.06020.98
5.6.100.0330.07321.13
5.6.90.0400.05321.00
5.6.80.0330.05720.45
5.6.70.0370.05020.39
5.6.60.0130.05020.30
5.6.50.0270.05720.48
5.6.40.0330.05020.34
5.6.30.0370.04720.42
5.6.20.0070.06020.42
5.6.10.0100.05720.39
5.6.00.0300.05020.41
5.5.360.0300.05720.46
5.5.350.0170.05320.45
5.5.340.0300.06020.91
5.5.330.0170.06020.74
5.5.320.0070.07020.91
5.5.310.0130.06320.92
5.5.300.0200.07020.94
5.5.290.0130.06320.86
5.5.280.0130.06320.82
5.5.270.0330.06720.72
5.5.260.0530.07320.72
5.5.250.0400.05320.72
5.5.240.0300.05320.12
5.5.230.0070.06320.29
5.5.220.0100.06320.24
5.5.210.0230.05320.22
5.5.200.0130.06720.30
5.5.190.0270.06020.21
5.5.180.0130.07320.09
5.5.160.0230.05720.29
5.5.150.0130.06320.17
5.5.140.0200.06320.30
5.5.130.0370.04020.23
5.5.120.0300.05020.08
5.5.110.0300.05020.25
5.5.100.0300.05320.08
5.5.90.0330.04720.19
5.5.80.0300.04720.11
5.5.70.0300.05320.05
5.5.60.0230.05719.97
5.5.50.0230.05720.14
5.5.40.0270.05320.05
5.5.30.0370.04720.08
5.5.20.0330.05020.14
5.5.10.0330.05020.11
5.5.00.0230.05719.96

preferences:
37.55 ms | 403 KiB | 5 Q