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.0201.97816.63
8.3.50.0171.98517.88
8.3.40.0101.99518.45
8.3.30.0071.99519.09
8.3.20.0032.00020.25
8.3.10.0071.99521.86
8.3.00.0032.00020.79
8.2.180.0131.99018.29
8.2.170.0031.99822.96
8.2.160.0101.99320.27
8.2.150.0071.99824.18
8.2.140.0032.00024.66
8.2.130.0002.00426.16
8.2.120.0071.99419.65
8.2.110.0002.00421.93
8.2.100.0071.99717.75
8.2.90.0032.00319.36
8.2.80.0101.99617.97
8.2.70.0072.00017.63
8.2.60.0031.99918.03
8.2.50.0032.00318.07
8.2.40.0071.99519.94
8.2.30.0071.99518.26
8.2.20.0002.00417.93
8.2.10.0071.99418.26
8.2.00.0002.00417.88
8.1.280.0071.99825.92
8.1.270.0071.99618.83
8.1.260.0002.00426.35
8.1.250.0031.99828.09
8.1.240.0031.99823.88
8.1.230.0002.00419.21
8.1.220.0002.00217.74
8.1.210.0002.00418.77
8.1.200.0101.99217.23
8.1.190.0031.99817.22
8.1.180.0032.00018.10
8.1.170.0101.98518.65
8.1.160.0032.00322.09
8.1.150.0032.00318.86
8.1.140.0071.99017.43
8.1.130.0002.00417.77
8.1.120.0032.00017.44
8.1.110.0002.00517.43
8.1.100.0002.00217.43
8.1.90.0131.98717.43
8.1.80.0002.00217.54
8.1.70.0031.99817.47
8.1.60.0071.99517.63
8.1.50.0101.99417.64
8.1.40.0002.00217.48
8.1.30.0171.98717.66
8.1.20.0031.99917.65
8.1.10.0031.99917.64
8.1.00.0431.95117.58
8.0.300.0031.99818.77
8.0.290.0031.99816.63
8.0.280.0071.99518.31
8.0.270.0002.00317.20
8.0.260.0031.99917.21
8.0.250.0032.00016.94
8.0.240.0002.00216.98
8.0.230.0002.00416.81
8.0.220.0002.00216.85
8.0.210.0032.00016.81
8.0.200.0031.99816.89
8.0.190.0002.00316.85
8.0.180.0031.99816.81
8.0.170.0171.99116.83
8.0.160.0002.00416.75
8.0.150.0002.00216.80
8.0.140.0071.99416.78
8.0.130.0031.99913.26
8.0.120.0002.00216.78
8.0.110.0031.99916.78
8.0.100.0031.99916.96
8.0.90.0131.98716.80
8.0.80.0101.99316.77
8.0.70.0002.00316.86
8.0.60.0031.99916.78
8.0.50.0002.00416.79
8.0.30.0251.96517.11
8.0.20.0051.99517.40
8.0.10.0031.99817.08
8.0.00.0081.99016.71
7.4.330.0002.00315.08
7.4.320.0002.00316.38
7.4.300.0002.00316.33
7.4.290.0071.99716.30
7.4.280.0131.98216.37
7.4.270.0071.99716.39
7.4.260.0031.99616.44
7.4.250.0401.95816.42
7.4.240.0031.99916.42
7.4.230.0002.00416.50
7.4.220.0131.98616.34
7.4.210.0131.98716.37
7.4.200.0002.00316.48
7.4.160.0031.99216.43
7.4.150.0202.00617.40
7.4.140.0101.99017.86
7.4.130.0141.97916.59
7.4.120.0081.99516.57
7.4.110.0322.34816.50
7.4.100.0102.46016.63
7.4.90.0132.44416.40
7.4.80.0132.44716.55
7.4.70.0102.41316.48
7.4.60.0172.47216.51
7.4.50.0032.49616.56
7.4.40.0102.45416.41
7.4.30.0102.33916.40
7.4.00.0102.48214.66
7.3.330.0071.99413.08
7.3.320.0071.99613.05
7.3.310.0071.99716.20
7.3.300.0002.00416.20
7.3.290.0171.98316.26
7.3.280.0151.98216.26
7.3.270.0161.99217.40
7.3.260.0161.98016.25
7.3.250.0121.99516.40
7.3.240.0101.99516.36
7.3.230.0222.45116.39
7.3.210.0132.43616.36
7.3.200.0162.43719.39
7.3.190.0072.46316.10
7.3.180.0192.43016.36
7.3.170.0512.05616.47
7.3.160.0442.26316.19
7.2.330.0132.46216.59
7.2.320.0132.43316.54
7.2.310.0192.45116.57
7.2.300.0132.46816.66
7.2.290.0102.46016.79
7.2.00.0072.49419.38
7.1.100.0072.49518.09
7.1.70.0032.49816.83
7.1.60.0102.49119.46
7.1.50.0072.49516.94
7.1.00.0072.49322.34
7.0.200.0102.49114.84
7.0.140.0002.50022.08
7.0.60.0102.49019.89
7.0.50.0032.49717.75
7.0.40.0032.49719.96
7.0.30.0272.47319.77
7.0.20.0702.43019.98
7.0.10.0132.48719.80
7.0.00.0132.48719.98
5.6.280.0072.49321.09
5.6.210.0102.49020.54
5.6.200.0072.49318.17
5.6.190.0072.49320.50
5.6.180.0472.45320.47
5.6.170.0332.46720.23
5.6.160.0132.48720.40
5.6.150.0072.49318.17
5.6.140.0072.49318.08
5.6.130.0072.49318.08
5.6.120.0032.49720.91
5.6.110.0072.49321.14
5.6.100.0072.49321.12
5.6.90.0072.49320.97
5.6.80.0002.50020.52
5.5.350.0272.47320.40
5.5.340.0072.49317.88
5.5.330.0102.49020.17
5.5.320.0032.49719.91
5.5.310.0302.47020.07
5.5.300.0032.49717.97
5.5.290.0072.49317.71
5.5.280.0132.48720.90
5.5.270.0002.50020.77
5.5.260.0102.49020.84
5.5.250.0132.48720.72
5.5.240.0072.49320.27
5.4.450.0202.47719.51
5.4.440.0272.47319.30
5.4.430.0172.48019.05
5.4.420.0202.47719.46
5.4.410.0232.47319.38
5.4.400.0272.47019.07
5.4.390.0031.56718.71
5.4.380.0171.57018.51
5.4.370.0071.59018.52
5.4.360.0201.65718.57
5.4.350.0131.66018.68
5.4.340.0171.63718.59
5.4.320.0231.56318.69
5.4.310.0071.68718.66
5.4.300.0171.61018.59
5.4.290.0171.80718.56
5.4.280.0071.28018.45
5.4.270.0201.47018.46
5.4.260.0131.46018.50
5.4.250.0171.80318.71
5.4.240.0101.55718.72
5.4.230.0201.82018.46
5.4.220.0301.62018.63
5.4.210.0171.39018.49
5.4.200.0131.30716.50
5.4.190.0101.23018.57
5.4.180.0231.22318.66
5.4.170.0131.22318.56
5.4.160.0171.20318.64
5.4.150.0101.20018.61
5.4.140.0171.20016.31
5.4.130.0071.20316.05
5.4.120.0071.19716.17
5.4.110.0131.20716.20
5.4.100.0231.20716.07
5.4.90.0101.06716.23
5.4.80.0170.97716.30
5.4.70.0070.98316.13
5.4.60.0130.99716.27
5.4.50.0130.99716.14
5.4.40.0100.92016.10
5.4.30.0070.88716.02
5.4.20.0070.91716.17
5.4.10.0130.98316.23

preferences:
43.02 ms | 400 KiB | 5 Q