3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '{"sales": [ { "ID": 123456, "transaction_id": "123456789", "key": "sdawa57sd547sad4sadx54ad", "subtotal": 20, "tax": "0", "fees": null, "total": "20", "gateway": "paypal", "email": "email@email.com", "date": "2018-08-01 13:13:55", "discounts": null, "products": [ { "id": 1234, "quantity": 1, "name": "Product 1", "price": 20, "price_name": "" } ] } ] }'; $results= json_decode($content, TRUE); foreach($results['sales'] as $item) { foreach ($item['products'] as $product) { if ($product['id'] == '1234') echo $product['name']; } }

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.4.140.0130.00817.81
8.4.130.0140.00519.53
8.4.120.0040.00523.98
8.4.110.0040.00522.70
8.4.100.0090.00818.86
8.4.90.0150.00618.92
8.4.80.0130.00717.69
8.4.70.0040.00418.13
8.4.60.0130.00719.07
8.4.50.0150.00719.58
8.4.40.0130.00619.59
8.4.30.0150.00619.34
8.4.20.0100.01020.40
8.4.10.0130.00619.60
8.3.270.0120.00916.64
8.3.260.0120.00716.56
8.3.250.0100.00918.93
8.3.240.0110.00917.21
8.3.230.0080.00816.52
8.3.220.0110.00718.93
8.3.210.0080.01116.69
8.3.200.0040.00416.51
8.3.190.0120.00618.78
8.3.180.0150.00516.73
8.3.170.0000.00819.07
8.3.160.0070.01016.50
8.3.150.0120.00620.75
8.3.140.0040.01116.57
8.3.130.0130.00718.28
8.3.120.0030.00618.85
8.3.110.0060.00316.62
8.3.100.0040.00419.97
8.3.90.0080.00026.77
8.3.80.0060.00319.36
8.3.70.0070.00716.58
8.3.60.0110.00418.43
8.3.50.0090.00517.26
8.3.40.0110.01418.73
8.3.30.0120.00318.73
8.3.20.0090.00019.04
8.3.10.0040.00423.48
8.3.00.0040.00420.64
8.2.290.0070.00720.64
8.2.280.0070.00820.41
8.2.270.0090.00917.27
8.2.260.0100.00718.84
8.2.250.0080.00018.44
8.2.240.0000.00818.71
8.2.230.0090.00020.94
8.2.220.0030.00724.06
8.2.210.0070.00726.77
8.2.200.0060.00318.88
8.2.190.0040.01118.41
8.2.180.0080.00816.50
8.2.170.0110.00322.96
8.2.160.0000.01322.13
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.01126.16
8.2.120.0050.00319.77
8.2.110.0000.00920.95
8.2.100.0060.00618.02
8.2.90.0030.00617.84
8.2.80.0030.00618.05
8.2.70.0050.00317.93
8.2.60.0000.00818.28
8.2.50.0000.00718.10
8.2.40.0040.00419.18
8.2.30.0000.00719.33
8.2.20.0070.00418.01
8.2.10.0080.00117.91
8.2.00.0040.00617.87
8.1.330.0080.01221.92
8.1.320.0120.00815.80
8.1.310.0090.00916.70
8.1.300.0000.00818.07
8.1.290.0040.00430.84
8.1.280.0120.00325.92
8.1.270.0080.00022.02
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0060.00324.03
8.1.230.0040.00722.66
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0090.00317.23
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0050.00518.96
8.1.150.0040.00418.82
8.1.140.0050.00419.78
8.1.130.0060.00418.73
8.1.120.0070.00317.45
8.1.110.0020.00717.43
8.1.100.0040.00617.42
8.1.90.0020.00717.46
8.1.80.0100.00217.42
8.1.70.0030.00517.43
8.1.60.0040.00517.53
8.1.50.0070.00217.48
8.1.40.0040.00517.56
8.1.30.0060.00317.63
8.1.20.0070.00317.66
8.1.10.0070.00317.43
8.1.00.0080.00317.40
8.0.300.0090.00019.70
8.0.290.0040.00416.63
8.0.280.0040.00418.33
8.0.270.0060.00316.84
8.0.260.0030.00517.58
8.0.250.0020.00616.87
8.0.240.0030.00516.85
8.0.230.0040.00616.84
8.0.220.0100.00016.83
8.0.210.0090.00216.84
8.0.200.0080.00316.88
8.0.190.0070.00216.88
8.0.180.0040.00516.83
8.0.170.0040.00416.82
8.0.160.0050.00316.94
8.0.150.0020.00816.81
8.0.140.0060.00316.78
8.0.130.0000.00715.11
8.0.120.0080.00316.80
8.0.110.0060.00416.88
8.0.100.0050.00416.73
8.0.90.0040.00416.82
8.0.80.0070.00516.80
8.0.70.0050.00416.88
8.0.60.0030.00516.78
8.0.50.0040.00616.79
8.0.30.0060.01016.97
8.0.20.0090.00717.04
8.0.10.0080.00817.01
8.0.00.0080.00917.10
7.4.330.0040.00515.95
7.4.320.0080.00416.39
7.4.300.0070.00516.54
7.4.290.0090.00316.47
7.4.280.0090.00316.40
7.4.270.0060.00516.51
7.4.260.0080.00316.37
7.4.250.0070.00516.45
7.4.240.0090.00316.46
7.4.230.0050.00716.53
7.4.220.0100.00116.51
7.4.210.0090.00616.52
7.4.200.0070.00416.43
7.4.190.0140.00216.45
7.4.180.0120.00516.46
7.4.160.0090.00716.56
7.4.150.0100.00516.41
7.4.140.0120.00617.31
7.4.130.0120.00716.71
7.4.120.0100.00816.66
7.4.110.0090.00816.82
7.4.100.0110.00716.62
7.4.90.0110.00716.73
7.4.80.0110.00717.13
7.4.70.0080.00916.64
7.4.60.0110.00816.66
7.4.50.0090.00916.66
7.4.40.0120.00516.74
7.4.30.0070.01016.61
7.4.20.0070.01016.62
7.4.10.0100.00916.72
7.4.00.0070.00816.00
7.3.330.0040.00414.56
7.3.320.0080.00314.58
7.3.310.0080.00416.23
7.3.300.0090.00216.17
7.3.290.0070.00516.15
7.3.280.0110.00516.16
7.3.270.0080.00816.22
7.3.260.0090.00816.69
7.3.250.0090.00816.58
7.3.240.0110.00616.49
7.3.230.0120.00616.60
7.3.220.0100.00716.49
7.3.210.0090.00816.49
7.3.200.0070.00816.46
7.3.190.0100.00916.61
7.3.180.0130.00416.45
7.3.170.0090.00816.52
7.3.160.0100.00816.49
7.3.150.0080.00816.57
7.3.140.0050.01316.57
7.3.130.0090.00716.50
7.3.120.0090.00815.91
7.3.110.0080.00915.89
7.3.100.0090.00715.93
7.3.90.0090.00615.89
7.3.80.0070.00816.02
7.3.70.0110.00815.92
7.3.60.0100.00716.04
7.3.50.0080.00816.00
7.3.40.0070.00915.95
7.3.30.0090.00815.97
7.3.20.0120.00816.53
7.3.10.0100.00716.53
7.3.00.0100.00816.58
7.2.340.0170.00816.78
7.2.330.0160.00716.72
7.2.320.0140.00716.73
7.2.310.0160.00616.62
7.2.300.0170.00516.70
7.2.290.0170.00516.70
7.2.280.0160.00716.67
7.2.270.0180.00816.79
7.2.260.0150.00916.75
7.2.250.0120.01116.17
7.2.240.0120.01016.12
7.2.230.0140.00816.19
7.2.220.0100.01116.18
7.2.210.0120.00716.18
7.2.200.0120.01016.17
7.2.190.0140.00716.12
7.2.180.0130.00716.16
7.2.170.0150.00616.15
7.2.160.0100.01116.55
7.2.150.0110.01216.84
7.2.140.0130.00716.79
7.2.130.0140.00716.85
7.2.120.0150.00616.81
7.2.110.0160.00916.60
7.2.100.0170.00816.52
7.2.90.0170.01016.53
7.2.80.0230.00716.48
7.2.70.0170.00616.65
7.2.60.0180.00816.60
7.2.50.0180.00716.55
7.2.40.0210.00916.70
7.2.30.0220.01116.66
7.2.20.0220.00916.68
7.2.10.0260.00716.63
7.2.00.0270.00816.69
7.1.330.0230.00715.91
7.1.320.0160.00715.86
7.1.310.0160.00815.90
7.1.300.0140.00815.88
7.1.290.0190.00615.84
7.1.280.0160.00715.81
7.1.270.0150.00715.84
7.1.260.0130.00815.84
7.1.250.0130.00915.81
7.1.240.0170.00815.82
7.1.230.0200.00715.57
7.1.220.0170.00915.54
7.1.210.0200.00715.53
7.1.200.0230.01115.60
7.1.190.0260.00715.49
7.1.180.0190.00715.53
7.1.170.0260.00715.54
7.1.160.0210.01115.57
7.1.150.0250.01015.47
7.1.140.0350.00815.56
7.1.130.0370.01015.56
7.1.120.0270.01115.55
7.1.110.0240.00715.53
7.1.100.0290.00715.54
7.1.90.0280.00515.51
7.1.80.0300.00715.56
7.1.70.0250.00915.46
7.1.60.0280.00917.77
7.1.50.0310.00817.80
7.1.40.0320.01017.77
7.1.30.0360.00817.76
7.1.20.0330.00917.74
7.1.10.0290.00915.51
7.1.00.0280.00915.56
7.0.330.0200.00415.44
7.0.320.0280.00815.47
7.0.310.0140.00915.51
7.0.300.0160.00815.46
7.0.290.0160.00715.44
7.0.280.0180.00615.44
7.0.270.0140.01015.45
7.0.260.0180.01015.40
7.0.250.0170.00715.46
7.0.240.0170.00715.59
7.0.230.0160.00815.47
7.0.220.0170.00615.46
7.0.210.0180.00715.48
7.0.200.0240.00815.48
7.0.190.0170.00715.54
7.0.180.0180.00615.49
7.0.170.0130.01015.55
7.0.160.0150.00915.46
7.0.150.0190.00815.53
7.0.140.0180.00915.51
7.0.130.0160.00715.47
7.0.120.0120.01115.49
7.0.110.0160.00915.48
7.0.100.0140.01015.48
7.0.90.0130.01015.51
7.0.80.0190.00815.42
7.0.70.0140.00815.43
7.0.60.0160.00615.55
7.0.50.0160.00815.47
7.0.40.0150.00915.46
7.0.30.0170.00915.48
7.0.20.0160.00715.46
7.0.10.0180.00715.53
7.0.00.0160.00815.51
5.6.400.0140.01015.93
5.6.390.0180.00615.89
5.6.380.0130.01015.76
5.6.370.0180.00715.96
5.6.360.0150.00915.92
5.6.350.0160.00815.85
5.6.340.0150.00915.93
5.6.330.0150.01015.87
5.6.320.0180.00915.87
5.6.310.0160.01015.91
5.6.300.0160.00715.89
5.6.290.0160.00815.87
5.6.280.0170.00615.92
5.6.270.0150.01015.85
5.6.260.0140.01016.00
5.6.250.0150.01015.85
5.6.240.0150.01015.94
5.6.230.0150.00915.97
5.6.220.0190.00615.91
5.6.210.0170.00915.99
5.6.200.0140.01116.04
5.6.190.0180.00715.95
5.6.180.0170.00916.01
5.6.170.0170.00915.95
5.6.160.0150.01015.92
5.6.150.0150.01115.84
5.6.140.0160.01015.90
5.6.130.0130.01316.00
5.6.120.0140.01315.85
5.6.110.0140.01115.92
5.6.100.0140.01215.90
5.6.90.0130.01415.86
5.6.80.0110.01215.86
5.6.70.0170.00815.95
5.6.60.0160.00615.88
5.6.50.0130.00915.84
5.6.40.0160.01015.95
5.6.30.0150.00915.88
5.6.20.0140.01115.83
5.6.10.0170.00915.92
5.6.00.0130.01215.83

preferences:
111.71 ms | 403 KiB | 5 Q