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)) { 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.0331.96716.63
8.3.50.0071.99617.90
8.3.40.0071.99718.84
8.3.30.0101.99219.00
8.3.20.0031.99820.51
8.3.10.0031.99821.69
8.3.00.0031.99820.94
8.2.180.0131.98918.30
8.2.170.0101.99322.96
8.2.160.0131.98920.57
8.2.150.0101.99024.18
8.2.140.0071.99524.66
8.2.130.0101.99326.16
8.2.120.0031.99820.14
8.2.110.0071.99520.92
8.2.100.0071.99218.16
8.2.90.0002.00319.17
8.2.80.0002.00317.97
8.2.70.0031.99717.75
8.2.60.0071.99918.03
8.2.50.0071.99518.10
8.2.40.0071.99420.59
8.2.30.0002.00418.25
8.2.20.0031.99917.76
8.2.10.0071.99518.20
8.2.00.0032.00017.81
8.1.280.0101.99325.92
8.1.270.0071.99719.00
8.1.260.0031.99926.35
8.1.250.0002.00428.09
8.1.240.0031.99823.83
8.1.230.0002.00220.30
8.1.220.0032.00017.76
8.1.210.0002.00618.77
8.1.200.0031.99817.23
8.1.190.0031.99817.22
8.1.180.0031.99718.10
8.1.170.0002.00318.38
8.1.160.0071.99622.21
8.1.150.0031.99818.94
8.1.140.0031.99719.26
8.1.130.0002.00517.82
8.1.120.0002.00517.50
8.1.110.0002.00417.48
8.1.100.0002.00417.59
8.1.90.0131.98317.50
8.1.80.0002.00217.35
8.1.70.0002.00417.41
8.1.60.0071.99717.59
8.1.50.0032.00017.63
8.1.40.0101.99117.65
8.1.30.0031.99917.63
8.1.20.0071.99717.51
8.1.10.0071.99717.51
8.1.00.0201.98017.62
8.0.300.0071.99318.96
8.0.290.0032.00316.63
8.0.280.0031.99818.51
8.0.270.0002.00117.07
8.0.260.0032.00017.20
8.0.250.0031.99816.88
8.0.240.0031.99816.83
8.0.230.0071.99716.83
8.0.220.0031.99816.88
8.0.210.0032.00016.75
8.0.200.0131.98816.88
8.0.190.0002.00316.92
8.0.180.0032.00016.75
8.0.170.0002.00316.88
8.0.160.0002.00416.73
8.0.150.0071.99716.83
8.0.140.0071.99616.72
8.0.130.0031.99913.35
8.0.120.0101.99316.69
8.0.110.0071.99416.68
8.0.100.0002.00116.64
8.0.90.0032.00316.64
8.0.80.0101.99316.83
8.0.70.0032.00016.58
8.0.60.0071.99516.61
8.0.50.0071.99416.82
8.0.30.0201.93016.96
8.0.20.0161.99517.40
8.0.10.0071.99516.76
8.0.00.0101.99216.76
7.4.330.0071.99315.03
7.4.320.0032.00116.39
7.4.300.0031.99816.56
7.4.290.0071.99516.47
7.4.280.0031.99916.39
7.4.270.0031.99716.49
7.4.260.0101.99316.48
7.4.250.0031.99916.45
7.4.240.0071.99616.47
7.4.230.0002.00216.54
7.4.220.0101.99016.36
7.4.210.0061.99416.50
7.4.200.0071.99516.38
7.4.160.0271.97016.56
7.4.150.0101.98917.40
7.4.140.0211.98917.86
7.4.130.0171.99216.48
7.4.120.0131.99916.52
7.4.110.0452.41116.36
7.4.100.0132.45916.48
7.4.90.0162.46116.48
7.4.80.0292.03516.52
7.4.70.0072.44916.56
7.4.60.0332.44216.42
7.4.50.0032.49616.52
7.4.40.0132.46116.41
7.4.30.0102.46416.42
7.4.00.0032.49514.78
7.3.330.0031.99813.09
7.3.320.0101.99613.26
7.3.310.0002.00316.18
7.3.300.0201.97916.22
7.3.290.0131.98716.24
7.3.280.0281.97016.28
7.3.270.0201.97317.40
7.3.260.0101.99116.24
7.3.250.0101.99316.27
7.3.240.0131.98816.21
7.3.230.0162.39016.39
7.3.210.0102.45516.17
7.3.200.0032.46719.39
7.3.190.0072.46616.45
7.3.180.0162.45416.24
7.3.170.0292.24916.47
7.3.160.0292.44316.36
7.2.330.0162.43816.75
7.2.320.0202.46116.74
7.2.310.0162.42816.65
7.2.300.0162.43816.65
7.2.290.0232.42916.45
7.2.00.0072.49419.15
7.1.100.0002.50217.98
7.1.70.0032.49817.16
7.1.60.0172.48519.46
7.1.50.0032.49817.05
7.1.00.0072.49322.34
7.0.200.0102.49114.62
7.0.140.0002.50022.09
7.0.60.0072.49319.95
7.0.50.0072.49317.84
7.0.40.0072.47319.87
7.0.30.0472.45319.74
7.0.20.0302.47019.81
7.0.10.0072.49319.80
7.0.00.0102.49019.90
5.6.280.0032.49720.90
5.6.210.0072.49320.46
5.6.200.0102.49018.13
5.6.190.0002.48320.16
5.6.180.0502.45020.41
5.6.170.0202.48020.25
5.6.160.0132.48720.30
5.6.150.0002.50018.17
5.6.140.0002.50018.17
5.6.130.0102.49018.07
5.6.120.0032.49721.06
5.6.110.0102.49021.15
5.6.100.0132.48720.99
5.6.90.0132.48721.00
5.6.80.0072.49320.54
5.5.350.0272.47320.32
5.5.340.0072.49317.84
5.5.330.0372.46320.10
5.5.320.0032.49720.21
5.5.310.0332.46720.23
5.5.300.0072.49317.89
5.5.290.0072.49317.90
5.5.280.0172.48320.91
5.5.270.0102.49020.95
5.5.260.0002.50020.80
5.5.250.0072.49320.59
5.5.240.0002.50020.03
5.4.450.0232.47319.40
5.4.440.0102.48719.30
5.4.430.0072.49019.19
5.4.420.0172.48019.27
5.4.410.0272.47019.31
5.4.400.0232.47318.98
5.4.390.0071.02718.51
5.4.380.0131.06318.59
5.4.370.0100.91318.56
5.4.360.0030.88718.51
5.4.350.0201.03018.54
5.4.340.0231.09718.44
5.4.320.0170.95718.56
5.4.310.0001.12318.69
5.4.300.0171.64318.69
5.4.290.0131.65018.66
5.4.280.0101.80318.52
5.4.270.0031.51718.58
5.4.260.0171.73718.70
5.4.250.0201.90318.68
5.4.240.0131.68018.72
5.4.230.0171.87318.62
5.4.220.0201.75318.67
5.4.210.0201.81718.65
5.4.200.0171.63316.41
5.4.190.0232.25318.64
5.4.180.0202.46018.65
5.4.170.0102.47018.48
5.4.160.0232.44718.51
5.4.150.0132.17318.66
5.4.140.0131.81016.18
5.4.130.0071.40016.26
5.4.120.0131.22716.32
5.4.110.0201.26716.35
5.4.100.0131.25316.20
5.4.90.0071.23316.20
5.4.80.0371.25016.21
5.4.70.0131.26716.06
5.4.60.0171.22016.18
5.4.50.0101.23716.13
5.4.40.0201.25016.18
5.4.30.0231.06716.17
5.4.20.0201.10016.28
5.4.10.0201.35016.02

preferences:
45.07 ms | 400 KiB | 5 Q