3v4l.org

run code in 300+ PHP versions simultaneously
<?php $raw_json = <<< 'JSON' { "fruit": [{ "id": 364823, "name": "Lemon", "amount": [33], "profile": "http://google.com", "buyid": 5 }, { "id": 367851, "name": "Orange", "amount": [69, 95, 166], "profile": "http://google.com", "buyid": 3 },{ "id": 35647, "name": "Apple", "amount": [77, 43], "profile": "http://google.com", "buyid": 31 } ] } JSON; $json = json_decode($raw_json, true); foreach($json['fruit'] as $fruit){ echo implode(' ',$fruit['amount'])."\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.60.0090.00618.30
8.3.50.0110.01021.98
8.3.40.0210.00018.70
8.3.30.0150.00018.68
8.3.20.0040.00420.34
8.3.10.0040.00423.64
8.3.00.0040.00419.87
8.2.180.0120.00325.92
8.2.170.0090.00622.96
8.2.160.0100.00320.96
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00422.30
8.2.120.0040.00426.35
8.2.110.0060.00319.23
8.2.100.0120.00017.84
8.2.90.0110.00019.70
8.2.80.0040.00419.36
8.2.70.0040.00417.50
8.2.60.0030.00618.03
8.2.50.0050.00318.07
8.2.40.0090.00018.16
8.2.30.0030.00518.08
8.2.20.0000.00817.73
8.2.10.0020.00518.13
8.2.00.0020.00518.11
8.1.280.0100.00725.92
8.1.270.0080.00023.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0050.00519.42
8.1.230.0110.00021.04
8.1.220.0040.00417.74
8.1.210.0040.00418.88
8.1.200.0040.00417.35
8.1.190.0030.00617.35
8.1.180.0080.00018.10
8.1.170.0000.00818.49
8.1.160.0000.00718.89
8.1.150.0050.00218.89
8.1.140.0000.00719.50
8.1.130.0080.00017.66
8.1.120.0030.00317.45
8.1.110.0070.00017.43
8.1.100.0000.00717.46
8.1.90.0000.00917.36
8.1.80.0050.00217.46
8.1.70.0030.00317.35
8.1.60.0000.00817.60
8.1.50.0030.00617.43
8.1.40.0080.00017.52
8.1.30.0030.00617.65
8.1.20.0040.00417.66
8.1.10.0080.00017.41
8.1.00.0040.00417.44
8.0.300.0000.00819.89
8.0.290.0070.00016.75
8.0.280.0030.00318.36
8.0.270.0030.00317.22
8.0.260.0030.00317.19
8.0.250.0070.00016.98
8.0.240.0000.00617.04
8.0.230.0000.00717.07
8.0.220.0000.00916.93
8.0.210.0000.00716.98
8.0.200.0000.00716.93
8.0.190.0040.00417.04
8.0.180.0040.00416.87
8.0.170.0000.00716.87
8.0.160.0000.00817.08
8.0.150.0000.00716.83
8.0.140.0080.00016.75
8.0.130.0030.00313.39
8.0.120.0040.00416.98
8.0.110.0050.00316.94
8.0.100.0000.00816.86
8.0.90.0000.00817.02
8.0.80.0120.01216.95
8.0.70.0070.00017.07
8.0.60.0000.00717.00
8.0.50.0040.00416.98
8.0.30.0100.00917.01
8.0.20.0080.01117.40
8.0.10.0040.00417.08
8.0.00.0140.00316.76
7.4.330.0000.00515.12
7.4.320.0060.00016.37
7.4.300.0030.00316.62
7.4.290.0040.00416.51
7.4.280.0050.00316.42
7.4.270.0070.00016.61
7.4.260.0030.00316.56
7.4.250.0040.00416.59
7.4.240.0000.00716.48
7.4.230.0030.00316.48
7.4.220.0090.00916.59
7.4.210.0100.00516.51
7.4.200.0030.00316.43
7.4.160.0120.00316.53
7.4.150.0090.00917.40
7.4.140.0120.00817.86
7.4.130.0060.01016.59
7.4.120.0110.00816.65
7.4.110.0150.00616.39
7.4.100.0100.00716.59
7.4.90.0070.01016.59
7.4.80.0100.00719.39
7.4.70.0090.00616.40
7.4.60.0110.00816.55
7.4.50.0060.01016.45
7.4.40.0070.01016.57
7.4.30.0070.01016.58
7.4.00.0090.00615.18
7.3.330.0000.00613.17
7.3.320.0030.00313.22
7.3.310.0080.00016.27
7.3.300.0000.00716.40
7.3.290.0070.00016.28
7.3.280.0110.00816.23
7.3.270.0110.00617.40
7.3.260.0080.01016.36
7.3.250.0120.00716.30
7.3.240.0120.00516.58
7.3.230.0100.00916.45
7.3.210.0070.01116.60
7.3.200.0100.00616.61
7.3.190.0050.01416.46
7.3.180.0060.01616.43
7.3.170.0090.01216.39
7.3.160.0070.01516.49
7.2.330.0080.00816.39
7.2.320.0030.01416.78
7.2.310.0090.00916.61
7.2.300.0090.00916.58
7.2.290.0130.00316.62
7.2.60.0060.00316.97
7.2.00.0000.01219.41
7.1.200.0080.00415.72
7.1.70.0000.00717.02
7.1.60.0030.00919.75
7.1.00.0000.07722.41
7.0.200.0650.00314.72
7.0.90.0100.07319.97
7.0.80.0030.07319.84
7.0.70.0100.06019.99
7.0.60.0130.06020.14
7.0.50.0170.06320.56
7.0.40.0170.06020.54
7.0.30.0070.07020.58
7.0.20.0200.05320.37
7.0.10.0100.06020.55
7.0.00.0300.04720.41
5.6.240.0130.06020.64
5.6.230.0170.06320.62
5.6.220.0170.05720.80
5.6.210.0100.05720.71
5.6.200.0170.05721.02
5.6.190.0030.07321.18
5.6.180.0100.06021.08
5.6.170.0100.06021.20
5.6.160.0230.05321.06
5.6.150.0130.06721.13
5.6.140.0170.05721.14
5.6.130.0170.07721.02
5.6.120.0070.07321.02
5.6.110.0170.06021.12
5.6.100.0170.06721.07
5.6.90.0070.07021.07
5.6.80.0100.06720.48
5.6.70.0170.05320.44
5.6.60.0130.06320.45
5.6.50.0200.04720.47
5.6.40.0130.06020.43
5.6.30.0030.06720.42
5.6.20.0030.06320.45
5.6.10.0170.05020.49
5.6.00.0170.05020.52

preferences:
56.43 ms | 401 KiB | 5 Q