3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uploadedAssets = json_decode('[ { "id": 28, "video_id": 5, "wistia_id": "4q9l3wynf5", "camera_angle": "front", "starting_foot": null, "verbal_cue": "on" }, { "id": 29, "video_id": 5, "wistia_id": "0puffz75s7", "camera_angle": "front", "starting_foot": null, "verbal_cue": "off" }, { "id": 30, "video_id": 5, "wistia_id": "9drxqjvfjm", "camera_angle": "back", "starting_foot": null, "verbal_cue": "on" }, { "id": 31, "video_id": 5, "wistia_id": "2ivgoapitc", "camera_angle": "back", "starting_foot": null, "verbal_cue": "off" } ]', true); $goodAsset = null; $demands = [ ['attribute' => 'camera_angle', 'value' => 'front'], ['attribute' => 'starting_foot', 'value' => 'right'], ['attribute' => 'verbal_cue', 'value' => 'off'] ]; while (!empty($demands) || empty($goodAsset)) { foreach ($uploadedAssets as $asset) { $match = true; foreach ($demands as $demand) { if ($asset[$demand['attribute']] != $demand['value']) { $match = false; break; } } if ($match) { $goodAsset = $asset; break; } } if (empty($goodAsset)) { array_pop($demands); } }

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.0471.95616.25
8.3.50.0101.99321.99
8.3.40.0032.00118.80
8.3.30.0071.99718.94
8.3.20.0071.99720.25
8.3.10.0071.99521.81
8.3.00.0071.99521.02
8.2.180.0071.99518.54
8.2.170.0032.00022.96
8.2.160.0031.99920.39
8.2.150.0032.00024.18
8.2.140.0002.00324.66
8.2.130.0002.00126.16
8.2.120.0031.99919.77
8.2.110.0032.00021.03
8.2.100.0002.00617.75
8.2.90.0002.00119.25
8.2.80.0031.99917.97
8.2.70.0101.99217.63
8.2.60.0071.99418.05
8.2.50.0031.99918.07
8.2.40.0101.99920.01
8.2.30.0071.99418.30
8.2.20.0032.00417.84
8.2.10.0031.99918.07
8.2.00.0002.01017.73
8.1.280.0131.98925.92
8.1.270.0032.00019.00
8.1.260.0002.00226.35
8.1.250.0031.99928.09
8.1.240.0071.99523.97
8.1.230.0071.99719.13
8.1.220.0031.99917.79
8.1.210.0031.99718.77
8.1.200.0071.99417.10
8.1.190.0131.98617.23
8.1.180.0032.00018.10
8.1.170.0101.98718.34
8.1.160.0002.00222.18
8.1.150.0031.99718.88
8.1.140.0002.00019.26
8.1.130.0002.00517.80
8.1.120.0031.99717.52
8.1.110.0032.00017.56
8.1.100.0032.00017.46
8.1.90.0101.99317.43
8.1.80.0032.00017.42
8.1.70.0002.00217.48
8.1.60.0031.99817.55
8.1.50.0032.00117.58
8.1.40.0032.00017.59
8.1.30.0131.99017.56
8.1.20.0101.99317.57
8.1.10.0002.00317.50
8.1.00.0002.00017.62
8.0.300.0002.00218.77
8.0.290.0032.00016.63
8.0.280.0031.99918.41
8.0.270.0031.99917.11
8.0.260.0071.99317.05
8.0.250.0032.00016.93
8.0.240.0031.99816.96
8.0.230.0032.00016.86
8.0.220.0032.00016.68
8.0.210.0002.00416.67
8.0.200.0071.99516.89
8.0.190.0071.99416.93
8.0.180.0032.00016.77
8.0.170.0071.99716.69
8.0.160.0002.00316.75
8.0.150.0032.00016.85
8.0.140.0002.00416.68
8.0.130.0002.00213.30
8.0.120.0031.99916.71
8.0.110.0071.99516.68
8.0.100.0101.99316.84
8.0.90.0071.99316.82
8.0.80.0031.99516.73
8.0.70.0002.00316.75
8.0.60.0071.99616.66
8.0.50.0032.00016.89
8.0.30.0181.95016.98
8.0.20.0111.99217.40
8.0.10.0002.00416.99
8.0.00.0181.98216.74
7.4.330.0031.98815.03
7.4.320.0032.00016.44
7.4.300.0002.00416.33
7.4.290.0002.00316.53
7.4.280.0032.00016.29
7.4.270.0002.00316.25
7.4.260.0071.99616.45
7.4.250.0071.99916.43
7.4.240.0022.00016.40
7.4.230.0032.00016.32
7.4.220.0131.98716.58
7.4.210.0161.98416.47
7.4.200.0031.99816.54
7.4.160.0501.94516.54
7.4.150.0191.98117.40
7.4.140.0081.99517.86
7.4.130.0121.99216.48
7.4.120.0131.98916.44
7.4.110.0162.44116.50
7.4.100.0262.44016.23
7.4.90.0202.45116.41
7.4.80.0392.23016.42
7.4.70.0102.44316.40
7.4.60.0172.47316.45
7.4.50.0032.49616.26
7.4.40.0032.46316.40
7.4.30.0102.46416.32
7.4.00.0032.49314.79
7.3.330.0031.99713.19
7.3.320.0032.00213.18
7.3.310.0071.99716.24
7.3.300.0002.00116.20
7.3.290.0081.99416.22
7.3.280.0191.97316.24
7.3.270.0101.99617.40
7.3.260.0071.99516.35
7.3.250.0081.99316.29
7.3.240.0131.98816.22
7.3.230.0192.43816.39
7.3.210.0032.47216.61
7.3.200.0262.15019.39
7.3.190.0132.45616.34
7.3.180.0132.45816.38
7.3.170.0352.05616.34
7.3.160.0192.38316.38
7.2.330.0132.43916.77
7.2.320.0102.44716.79
7.2.310.0102.41816.43
7.2.300.0072.44416.74
7.2.290.0032.46716.41
7.2.00.0102.49119.45
7.1.100.0102.49117.80
7.1.70.0032.49817.16
7.1.60.0132.48819.46
7.1.50.0072.49516.94
7.1.00.0072.49322.36
7.0.200.0132.48715.01
7.0.140.0002.50021.93
7.0.60.0032.49719.82
7.0.50.0132.48717.73
7.0.40.0102.47019.79
7.0.30.0632.42019.84
7.0.20.0102.49019.89
7.0.10.0002.50019.73
7.0.00.0072.49319.95
5.6.280.0072.49320.91
5.6.210.0032.49720.45
5.6.200.0102.46718.17
5.6.190.0032.49720.37
5.6.180.0332.44720.32
5.6.170.0272.47320.36
5.6.160.0032.49720.39
5.6.150.0072.49317.93
5.6.140.0072.49317.93
5.6.130.0132.48718.17
5.6.120.0072.49321.04
5.6.110.0072.49321.03
5.6.100.0072.49320.98
5.6.90.0032.49721.01
5.6.80.0002.50020.43
5.5.350.0272.47320.44
5.5.340.0032.49717.89
5.5.330.0102.49020.09
5.5.320.0032.49720.11
5.5.310.0272.47320.16
5.5.300.3702.12717.95
5.5.290.0032.49718.00
5.5.280.0072.49320.79
5.5.270.4102.09020.76
5.5.260.0102.49020.78
5.5.250.0072.49320.63
5.5.240.0032.49720.15
5.4.450.0202.48019.33
5.4.440.0132.48319.20
5.4.430.0132.48319.34
5.4.420.0172.48319.34
5.4.410.0172.48019.22
5.4.400.0132.48318.98
5.4.390.0170.95318.70
5.4.380.0100.98018.59
5.4.370.0370.97718.53
5.4.360.0200.99018.69
5.4.350.0070.98018.69
5.4.340.0131.09018.55
5.4.320.0200.95318.56
5.4.310.0170.99718.54
5.4.300.0031.02718.58
5.4.290.0271.01018.50
5.4.280.0130.91718.66
5.4.270.0070.91018.58
5.4.260.0131.05318.63
5.4.250.0271.36318.69
5.4.240.0131.60018.45
5.4.230.0101.69318.55
5.4.220.0232.00718.49
5.4.210.0071.98018.68
5.4.200.0201.61716.47
5.4.190.0071.76318.46
5.4.180.0131.71318.50
5.4.170.0271.85018.49
5.4.160.0271.88318.54
5.4.150.0202.07318.54
5.4.140.0072.18016.36
5.4.130.0202.46716.16
5.4.120.0172.46716.17
5.4.110.0232.45716.20
5.4.100.0102.35716.13
5.4.90.0171.57716.11
5.4.80.0171.59716.14
5.4.70.0101.24716.23
5.4.60.0101.17716.28
5.4.50.0231.20016.04
5.4.40.0131.26716.21
5.4.30.0131.31716.13
5.4.20.0231.24716.05
5.4.10.0271.22716.04

preferences:
60.09 ms | 401 KiB | 5 Q