3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[{ "name": "abc", "category": "new_cat", "selectedLanguage": [{ "de": "Deutsch", "de_status": "APPROVED" }] }, { "name": "abc", "category": "new_cat", "selectedLanguage": [{ "en": "English", "en_status": "APPROVED" }] }]'; $result = []; foreach (json_decode($json, true) as $row) { if (!isset($result[$row['name']])) { $result[$row['name']] = $row; } else { $result[$row['name']]['selectedLanguage'] = array_merge($result[$row['name']]['selectedLanguage'], $row['selectedLanguage']); } } var_export(array_values($result));

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.30.0100.00817.69
8.5.20.0100.00816.61
8.5.10.0130.00716.82
8.5.00.0090.01220.13
8.4.180.0140.00725.61
8.4.170.0140.00723.84
8.4.160.0120.01123.93
8.4.150.0080.00616.82
8.4.140.0110.00917.54
8.4.130.0130.00817.90
8.4.120.0060.00322.43
8.4.110.0150.00518.94
8.4.100.0040.01217.72
8.4.90.0030.00620.84
8.4.80.0030.00618.83
8.4.70.0080.01120.59
8.4.60.0130.00918.94
8.4.50.0130.00818.67
8.4.40.0030.00617.63
8.4.30.0030.00618.64
8.4.20.0170.00319.64
8.4.10.0130.00619.52
8.3.300.0100.01022.85
8.3.290.0160.00518.51
8.3.280.0070.00516.21
8.3.270.0090.01016.61
8.3.260.0110.00816.52
8.3.250.0090.01018.84
8.3.240.0110.00816.75
8.3.230.0110.00916.75
8.3.220.0040.00419.05
8.3.210.0130.00616.61
8.3.200.0040.00516.53
8.3.190.0110.00816.41
8.3.180.0050.00316.42
8.3.170.0140.00418.85
8.3.160.0110.00720.30
8.3.150.0060.01216.53
8.3.140.0040.00417.19
8.3.130.0030.00618.28
8.3.120.0000.01018.88
8.3.110.0070.00420.94
8.3.100.0080.00016.64
8.3.90.0080.00816.66
8.3.80.0060.00316.50
8.3.70.0070.00716.58
8.3.60.0000.01416.38
8.3.50.0140.00324.53
8.3.40.0110.00418.79
8.3.30.0090.00618.67
8.3.20.0070.00024.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.300.0100.01118.17
8.2.290.0110.00816.66
8.2.280.0060.00216.62
8.2.270.0100.01017.16
8.2.260.0000.00818.40
8.2.250.0030.00617.37
8.2.240.0040.00418.83
8.2.230.0060.00322.58
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0040.00416.75
8.2.190.0100.01016.88
8.2.180.0110.00425.92
8.2.170.0150.00018.92
8.2.160.0120.00422.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0070.00319.30
8.2.100.0090.00317.72
8.2.90.0000.00817.63
8.2.80.0030.00618.86
8.2.70.0090.00017.93
8.2.60.0050.00318.03
8.2.50.0080.00018.10
8.2.40.0040.00419.46
8.2.30.0040.00419.34
8.2.20.0050.00218.19
8.2.10.0000.00819.27
8.2.00.0030.00619.32
8.1.340.0100.00918.10
8.1.330.0120.00616.13
8.1.320.0110.00815.94
8.1.310.0150.00418.46
8.1.300.0090.00018.70
8.1.290.0100.00018.88
8.1.280.0140.00425.92
8.1.270.0100.00021.95
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.11
8.1.230.0040.00719.05
8.1.220.0040.00417.77
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0030.00618.95
8.1.150.0040.00418.83
8.1.140.0030.00518.95
8.1.130.0030.00320.16
8.1.120.0000.00717.49
8.1.110.0050.00217.49
8.1.100.0000.00717.43
8.1.90.0080.00017.48
8.1.80.0040.00417.49
8.1.70.0040.00417.45
8.1.60.0080.00017.44
8.1.50.0030.00517.50
8.1.40.0000.00817.50
8.1.30.0040.00417.68
8.1.20.0080.00617.60
8.1.10.0030.00817.37
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.47
8.0.270.0000.00816.85
8.0.260.0070.00018.37
8.0.250.0040.00416.88
8.0.240.0030.00317.02
8.0.230.0000.00716.85
8.0.220.0000.00916.90
8.0.210.0000.00716.97
8.0.200.0030.00316.99
8.0.190.0000.00816.99
8.0.180.0070.00016.97
8.0.170.0000.00916.91
8.0.160.0030.00516.98
8.0.150.0030.00416.95
8.0.140.0040.00416.88
8.0.130.0030.00313.33
8.0.120.0050.00316.84
8.0.110.0000.00816.75
8.0.100.0070.00016.76
8.0.90.0000.00916.97
8.0.80.0110.00816.85
8.0.70.0040.00416.91
8.0.60.0040.00416.90
8.0.50.0000.00816.87
8.0.30.0030.01317.09
8.0.20.0110.00817.32
8.0.10.0060.00317.08
8.0.00.0070.01116.79
7.4.330.0020.00215.55
7.4.320.0000.00716.63
7.4.300.0080.00016.43
7.4.290.0040.00416.46
7.4.280.0040.00416.62
7.4.270.0040.00416.54
7.4.260.0050.00013.41
7.4.250.0040.00416.52
7.4.240.0000.00716.62
7.4.230.0030.00316.70
7.4.220.0030.00416.39
7.4.210.0040.01116.60
7.4.200.0000.00716.43
7.4.130.0070.01216.57
7.4.120.0060.01516.54
7.4.110.0120.00616.54
7.4.100.0100.01316.37
7.4.90.0100.01316.60
7.4.80.0070.01319.39
7.4.70.0070.00916.19
7.4.60.0100.00716.38
7.4.50.0120.00616.54
7.4.40.0060.01216.32
7.4.30.0060.01216.52
7.4.20.0100.00716.45
7.4.10.0090.00916.36
7.4.00.0050.01316.56
7.3.330.0030.00716.26
7.3.320.0030.00313.14
7.3.310.0030.00316.19
7.3.300.0000.00616.25
7.3.290.0070.00716.30
7.3.260.0130.01116.33
7.3.240.0110.00616.41
7.3.230.0060.02116.37
7.3.210.0070.01016.52
7.3.200.0060.01116.52
7.3.190.0030.01716.61
7.3.180.0140.00416.26
7.3.170.0040.01116.59
7.3.160.0070.01016.56
7.3.150.0060.01116.36
7.3.140.0100.00716.57
7.3.130.0030.01316.65
7.3.120.0150.00616.29
7.3.110.0090.01116.22
7.3.100.0130.00616.19
7.3.90.0070.01016.26
7.3.80.0120.00616.20
7.3.70.0090.00816.49
7.3.60.0090.00616.40
7.3.50.0140.00516.50
7.3.40.0060.01616.40
7.3.30.0090.00616.31
7.3.20.0140.00716.47
7.3.10.0140.00316.34
7.3.00.0080.00816.35
7.2.330.0100.01016.66
7.2.320.0100.00616.71
7.2.310.0100.00716.38
7.2.300.0070.01016.64
7.2.290.0080.00816.57
7.2.280.0090.00916.52
7.2.270.0060.01316.48
7.2.260.0110.00616.55
7.2.250.0000.01716.50
7.2.240.0100.00616.82
7.2.230.0130.00716.65
7.2.220.0040.01416.63
7.2.210.0170.00616.46
7.2.200.0090.00616.70
7.2.190.0030.01416.45
7.2.180.0040.01216.68
7.2.170.0060.01216.58
7.2.160.0070.01016.52
7.2.150.0070.01116.59
7.2.140.0190.00016.39
7.2.130.0070.01116.64
7.2.120.0100.00716.58
7.2.110.0100.00716.55
7.2.100.0070.01016.59
7.2.90.0110.01116.56
7.2.80.0160.00316.66
7.2.70.0080.00816.67
7.2.60.0090.00916.45
7.2.50.0060.01216.61
7.2.40.0070.01016.63
7.2.30.0090.01516.55
7.2.20.0120.00816.65
7.2.10.0130.00616.67
7.2.00.0090.00916.63

preferences:
46.75 ms | 1565 KiB | 5 Q