3v4l.org

run code in 300+ PHP versions simultaneously
<?php $merged_array = array(); $final_array = array(); $json[123]["data"]["categories"] = array( array( 'id' => '2', 'description' => 'Single-player' ), array( 'id' => '1', 'description' => 'Multi-player' ), array( 'id' => '9', 'description' => 'Co-op' ), array( 'id' => '22', 'description' => 'Steam Achievements' ), array( 'id' => '28', 'description' => 'Full controller support' ) ); $json[456]["data"]["categories"] = array( array( 'id' => '21', 'description' => 'Downloadable Content' ) ); $json[786]["data"]["categories"] = array( array( 'id' => '31', 'description' => 'Downloadable Content' ) ); $json[058]["data"]["categories"] = array( array( 'id' => '41', 'description' => 'Downloadable Content' ) ); foreach($json as $key=>$value){ array_push($merged_array,$json[$key]["data"]["categories"]); } foreach($merged_array as $value){ foreach($value as $val){ array_push($final_array,$val); } } print_r($final_array); ?>

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)
5.6.280.0030.07321.09
5.6.210.0100.05020.48
5.6.200.0130.04318.16
5.6.190.0100.07320.61
5.6.180.0230.04320.48
5.6.170.0100.05720.49
5.6.160.0070.07020.51
5.6.150.0000.08718.18
5.6.140.0100.06318.18
5.6.130.0070.04318.17
5.6.120.0070.09020.89
5.6.110.0070.09321.00
5.6.100.0030.04020.98
5.6.90.0070.03721.13
5.6.80.0100.07720.36
5.5.350.0000.07720.42
5.5.340.0000.05717.96
5.5.330.0030.07320.29
5.5.320.0500.06720.24
5.5.310.0370.08020.37
5.5.300.0100.07017.98
5.5.290.0000.05717.98
5.5.280.0170.05320.80
5.5.270.0070.03720.80
5.5.260.0030.04320.78
5.5.250.0100.07020.69
5.5.240.0230.07020.20
5.4.450.1870.03719.23
5.4.440.1930.05019.30
5.4.430.1870.03719.35
5.4.420.1830.03719.38
5.4.410.1530.04018.94
5.4.400.1730.04318.79
5.4.390.1500.04318.86
5.4.380.1500.03319.16
5.4.370.2000.03718.98
5.4.360.1500.04019.21
5.4.350.1600.04719.16
5.4.340.1800.04018.89
5.4.320.1600.04318.97
5.4.310.1570.03718.89
5.4.300.1770.04318.88
5.4.290.1700.04319.16
5.4.280.1570.03718.99
5.4.270.1500.03718.77
5.4.260.1670.03318.99
5.4.250.1570.04018.74
5.4.240.1600.04319.07
5.4.230.1600.03319.16
5.4.220.1700.04018.97
5.4.210.1730.03719.11
5.4.200.1830.03719.16
5.4.190.1700.03718.74
5.4.180.1670.03719.14
5.4.170.1530.04018.74
5.4.160.1570.03718.73
5.4.150.1570.03718.77
5.4.140.1600.03016.50
5.4.130.1530.03316.34
5.4.120.2030.02716.30
5.4.110.1600.03716.40
5.4.100.1630.04316.29
5.4.90.1670.03716.45
5.4.80.1670.03316.50
5.4.70.1630.02716.57
5.4.60.1700.02716.43
5.4.50.1630.04016.35
5.4.40.1700.04716.26
5.4.30.1570.03316.42
5.4.20.1600.03716.53
5.4.10.1930.04316.42
5.4.00.1670.04715.95
5.3.290.1730.04714.59
5.3.280.1630.03714.83
5.3.270.1600.04014.59
5.3.260.1670.04314.76
5.3.250.1430.04014.54
5.3.240.1500.03314.53
5.3.230.1630.03714.70
5.3.220.1430.04014.65
5.3.210.1730.04314.80
5.3.200.1730.04014.80
5.3.190.1570.03014.49
5.3.180.1730.04314.65
5.3.170.0000.04314.66
5.3.160.0070.07714.66
5.3.150.0070.07314.59
5.3.140.0900.05014.71
5.3.130.1730.04314.70
5.3.120.1800.03314.68
5.3.110.1530.03014.46
5.3.100.1700.04713.95
5.3.90.1430.04014.08
5.3.80.1630.02314.25
5.3.70.1830.03014.00
5.3.60.1570.03714.06
5.3.50.1500.03313.88
5.3.40.1730.03314.04
5.3.30.1470.04314.01
5.3.20.0070.07013.71
5.3.10.0070.05713.78
5.3.00.0870.04013.55
5.2.170.1400.03311.21
5.2.160.1170.03311.07
5.2.150.1300.03311.17
5.2.140.1270.03011.07
5.2.130.1370.03011.05
5.2.120.1270.02711.02
5.2.110.1400.03711.20
5.2.100.1130.03311.12
5.2.90.1230.03011.12
5.2.80.1530.03011.18
5.2.70.1500.03311.32
5.2.60.1470.03710.96
5.2.50.1370.04711.09
5.2.40.0330.03310.92
5.2.30.0000.03310.94
5.2.20.0000.03010.89
5.2.10.0030.02711.00
5.2.00.0200.02310.80
5.1.60.1200.02710.10
5.1.50.1200.03710.00
5.1.40.1300.0339.87
5.1.30.0970.03010.42
5.1.20.1070.02710.26
5.1.10.1030.02710.14
5.1.00.1070.02310.07
5.0.50.0670.0208.44
5.0.40.0770.0308.41
5.0.30.0670.0478.37
5.0.20.0630.0208.11
5.0.10.0570.0178.12
5.0.00.0570.0378.09
4.4.90.0670.0277.76
4.4.80.0530.0137.76
4.4.70.0570.0237.76
4.4.60.0500.0177.76
4.4.50.0600.0207.76
4.4.40.0670.0277.76
4.4.30.0530.0207.76
4.4.20.0000.0177.76
4.4.10.0030.0137.76
4.4.00.0030.0207.76
4.3.110.0000.0177.76
4.3.100.0000.0177.76
4.3.90.0030.0137.76
4.3.80.0000.0277.76
4.3.70.0000.0177.76
4.3.60.0370.0177.76
4.3.50.0530.0137.76
4.3.40.0670.0377.76
4.3.30.0300.0177.76
4.3.20.0270.0207.76
4.3.10.0270.0177.76
4.3.00.0300.0177.76

preferences:
140.57 ms | 1394 KiB | 7 Q