3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "type": "the type", "typesm": "type of", "entries": [ { "title": "title one", "body": "Original text", "image": "image 1 url", "time": "1558532690", "meta": { "mainColor": "#100a0e", "adSpace": null } }, { "title": "title two", "body": "Original text", "image": "image 1 url", "time": "1558515409", "meta": { "mainColor": "#100a0e", "adSpace": null } }]}'; $arr = json_decode($json, true); $arr['entries'] = array_column($arr['entries'], null, 'body'); foreach ($arr['entries'] as $ent){ echo $ent['image']. "\n"; echo $ent['title']. "\n"; echo $ent['body']. "\n"; } unset($ent); Echo "\n\n\n"; $arr = json_decode($json, true); foreach($arr['entries'] as $e){ $ent[$e['body'] . " " . $e['image']] = $e; } //$ent is now the new array with unique values of 'entries' foreach ($ent as $e){ echo $e['image'] . "\n"; echo $e['title'] . "\n"; echo $e['body'] . "\n"; }

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.70.0120.00318.31
8.3.60.0120.00318.30
8.3.50.0090.01017.31
8.3.40.0120.00318.60
8.3.30.0090.00618.64
8.3.20.0050.00320.71
8.3.10.0080.00020.69
8.3.00.0080.00021.60
8.2.190.0190.00818.08
8.2.180.0140.00725.92
8.2.170.0140.00022.96
8.2.160.0090.00620.52
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.06
8.2.110.0000.01019.30
8.2.100.0000.01217.71
8.2.90.0040.00418.03
8.2.80.0000.00817.97
8.2.70.0000.00818.02
8.2.60.0000.00818.22
8.2.50.0030.00518.10
8.2.40.0000.00819.11
8.2.30.0000.00819.29
8.2.20.0060.00317.99
8.2.10.0000.00818.80
8.2.00.0000.00719.49
8.1.280.0090.01225.92
8.1.270.0060.00322.16
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.83
8.1.230.0110.00021.01
8.1.220.0000.00817.79
8.1.210.0000.00819.03
8.1.200.0080.00017.35
8.1.190.0000.00817.22
8.1.180.0050.00518.10
8.1.170.0040.00418.59
8.1.160.0000.00718.88
8.1.150.0050.00218.88
8.1.140.0000.00818.87
8.1.130.0040.00420.02
8.1.120.0000.00717.48
8.1.110.0030.00617.37
8.1.100.0070.00017.43
8.1.90.0000.00817.45
8.1.80.0000.00717.34
8.1.70.0060.00317.33
8.1.60.0050.00317.54
8.1.50.0000.00817.39
8.1.40.0060.00317.51
8.1.30.0000.00817.63
8.1.20.0030.00517.54
8.1.10.0030.00517.44
8.1.00.0000.00817.39
8.0.300.0040.00419.90
8.0.290.0000.00816.63
8.0.280.0040.00418.39
8.0.270.0030.00316.76
8.0.260.0030.00320.17
8.0.250.0030.00316.97
8.0.240.0040.00416.91
8.0.230.0040.00416.80
8.0.220.0000.00716.77
8.0.210.0040.00416.92
8.0.200.0000.00616.84
8.0.190.0030.00516.80
8.0.180.0040.00416.97
8.0.170.0050.00316.77
8.0.160.0040.00316.95
8.0.150.0050.00316.82
8.0.140.0000.00716.80
8.0.130.0030.00313.26
8.0.120.0050.00316.76
8.0.110.0080.00016.88
8.0.100.0000.00816.77
8.0.90.0030.00616.71
8.0.80.0030.01216.95
8.0.70.0040.00416.77
8.0.60.0040.00416.95
8.0.50.0030.00516.86
8.0.30.0100.00717.12
8.0.20.0060.01317.10
8.0.10.0060.00317.07
8.0.00.0130.00816.81
7.4.330.0000.00415.55
7.4.320.0030.00316.49
7.4.300.0000.00616.41
7.4.290.0070.00016.51
7.4.280.0050.00416.48
7.4.270.0030.00616.50
7.4.260.0040.00416.60
7.4.250.0070.00016.45
7.4.240.0100.00016.42
7.4.230.0000.00716.66
7.4.220.0040.00416.57
7.4.210.0060.00816.49
7.4.200.0070.00016.47
7.4.140.0080.00817.86
7.4.130.0080.01016.61
7.4.120.0120.00616.47
7.4.110.0120.00616.43
7.4.100.0080.00816.50
7.4.90.0030.01316.52
7.4.80.0060.01219.39
7.4.70.0110.00816.57
7.4.60.0090.00616.47
7.4.50.0030.00916.20
7.4.40.0100.00616.56
7.4.10.0090.00914.80
7.4.00.0080.01014.89
7.3.330.0020.00213.12
7.3.320.0000.00613.06
7.3.310.0090.00016.16
7.3.300.0030.00316.32
7.3.290.0040.00416.34
7.3.280.0060.01216.28
7.3.260.0100.00716.49
7.3.240.0080.00816.37
7.3.230.0060.01016.50
7.3.210.0100.00716.47
7.3.200.0070.01016.62
7.3.190.0030.01516.75
7.3.180.0130.00716.64
7.3.170.0060.00916.30
7.3.160.0030.01316.56
7.3.130.0180.00015.09
7.3.120.0030.01414.91
7.3.110.0090.00914.81
7.3.100.0060.00914.78
7.3.90.0060.01014.62
7.3.80.0070.00414.94
7.3.70.0070.00714.85
7.3.60.0080.00314.95
7.3.50.0100.01114.92
7.3.40.0130.00614.58
7.3.30.0070.00514.60
7.3.20.0060.01116.48
7.3.10.0060.00916.58
7.3.00.0060.01016.75
7.2.330.0060.01216.61
7.2.320.0100.01016.57
7.2.310.0130.00816.77
7.2.300.0120.00616.74
7.2.290.0060.01216.80
7.2.260.0050.01214.66
7.2.250.0120.00615.05
7.2.240.0090.00615.00
7.2.230.0080.00815.08
7.2.220.0030.01314.72
7.2.210.0000.01415.15
7.2.200.0070.00315.00
7.2.190.0030.00615.05
7.2.180.0110.00615.14
7.2.170.0090.00714.97
7.2.160.0110.00115.01
7.2.150.0070.00716.95
7.2.140.0080.00916.83
7.2.130.0070.00916.74
7.2.120.0050.01516.79
7.2.110.0080.00617.02
7.2.100.0150.00116.76
7.2.90.0060.00716.81
7.2.80.0080.00917.04
7.2.70.0070.00616.89
7.2.60.0060.00616.99
7.2.50.0060.00817.00
7.2.40.0100.00616.92
7.2.30.0090.00817.00
7.2.20.0040.01216.96
7.2.10.0090.00516.93
7.2.00.0070.01117.08
7.1.330.0040.00815.90
7.1.320.0060.00915.79
7.1.310.0070.00715.93
7.1.300.0030.01015.79
7.1.290.0120.00315.73
7.1.280.0110.00615.84
7.1.270.0050.00715.88
7.1.260.0070.00815.71
7.1.250.0110.00815.84
7.1.240.0060.00615.78
7.1.230.0000.00815.63
7.1.220.0060.00615.91
7.1.210.0030.00915.91
7.1.200.0000.00815.63
7.1.190.0070.00315.72
7.1.180.0070.00715.75
7.1.170.0060.01015.87
7.1.160.0100.00715.82
7.1.150.0070.00715.83
7.1.140.0040.00715.97
7.1.130.0030.01015.74
7.1.120.0030.01015.56
7.1.110.0030.01016.01
7.1.100.0070.00715.82
7.1.90.0000.01415.74
7.1.80.0000.01415.54
7.1.70.0130.00316.03
7.1.60.0070.00716.00
7.1.50.0060.00915.68
7.1.40.0090.00315.76
7.1.30.0070.00715.92
7.1.20.0060.00915.90
7.1.10.0030.01215.73
7.1.00.0030.01416.01

preferences:
56.5 ms | 401 KiB | 5 Q