3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<DATA <div class="list"> <div class="ui_checkbox type hidden" data-categories="57 48 "> <input id="attraction_type_119" type="checkbox" value="119" <label for="attraction_type_119">Aquariums</label> </div> <div class="ui_checkbox type " data-categories="47 "> <input id="attraction_type_120" type="checkbox" value="120" <label for="attraction_type_120">Arènes et stades</label> </div> </div> DATA; $data = array(); $dom = new DOMDocument(); @$dom->loadHTML($html); $xp = new DOMXpath($dom); $items = $xp->query('//div[@class="list"]/div'); foreach($items as $item) { $temp["data_categorie"] = $item->getAttribute("data-categories"); foreach ($item->childNodes as $child) { if ($child->nodeName === "input") { $temp["input_value"] = $child->getAttribute("value"); $temp["label_text"] = $child->nextSibling->nodeValue; } } $data[] = $temp; } print_r($data);

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.120.0060.00319.36
8.3.110.0040.00420.94
8.3.100.0030.01017.30
8.3.90.0030.00926.77
8.3.80.0130.00017.25
8.3.70.0050.01417.21
8.3.60.0160.00017.00
8.3.50.0170.00723.77
8.3.40.0140.00419.60
8.3.30.0120.00319.34
8.3.20.0080.00024.18
8.3.10.0030.00524.66
8.3.00.0080.00026.16
8.2.240.0150.00317.32
8.2.230.0110.00322.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0030.00718.79
8.2.190.0120.00617.00
8.2.180.0030.01425.92
8.2.170.0110.00419.46
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.33
8.2.110.0060.00321.43
8.2.100.0070.00718.22
8.2.90.0060.00318.14
8.2.80.0000.00818.41
8.2.70.0000.01118.30
8.2.60.0050.00318.53
8.2.50.0000.00818.10
8.2.40.0100.00319.59
8.2.30.0030.00519.52
8.2.20.0030.00518.42
8.2.10.0040.00419.73
8.2.00.0000.00719.77
8.1.300.0050.00516.57
8.1.290.0040.00730.84
8.1.280.0060.01325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0000.00924.17
8.1.230.0070.00423.14
8.1.220.0000.00818.29
8.1.210.0000.00820.56
8.1.200.0030.00617.75
8.1.190.0030.00717.60
8.1.180.0060.00318.16
8.1.170.0050.00319.21
8.1.160.0000.00719.53
8.1.150.0040.00419.24
8.1.140.0070.00019.20
8.1.130.0070.00020.43
8.1.120.0040.00417.76
8.1.110.0040.00417.84
8.1.100.0000.00817.73
8.1.90.0000.00817.71
8.1.80.0050.00317.70
8.1.70.0000.00717.78
8.1.60.0000.00817.85
8.1.50.0050.00317.94
8.1.40.0030.00617.93
8.1.30.0030.00517.85
8.1.20.0000.01218.02
8.1.10.0050.00318.00
8.1.00.0080.00017.85
8.0.300.0080.00022.21
8.0.290.0040.00417.00
8.0.280.0000.00718.73
8.0.270.0000.00919.04
8.0.260.0030.00318.73
8.0.250.0000.00817.24
8.0.240.0000.00917.30
8.0.230.0000.00817.37
8.0.220.0040.00417.32
8.0.210.0000.00717.32
8.0.200.0040.00417.37
8.0.190.0000.00817.36
8.0.180.0030.00517.38
8.0.170.0060.00617.21
8.0.160.0050.00317.29
8.0.150.0040.00417.26
8.0.140.0040.00417.29
8.0.130.0060.00013.66
8.0.120.0040.00417.29
8.0.110.0070.00017.23
8.0.100.0030.00517.19
8.0.90.0000.00917.14
8.0.80.0090.01017.29
8.0.70.0050.00517.21
8.0.60.0030.00517.19
8.0.50.0040.00417.39
8.0.30.0150.00717.40
8.0.20.0130.01017.66
8.0.10.0040.00417.33
8.0.00.0100.01017.17
7.4.330.0030.00315.55
7.4.320.0000.00617.01
7.4.300.0000.00616.90
7.4.290.0040.00416.97
7.4.280.0050.00316.80
7.4.270.0030.00316.87
7.4.260.0000.00513.66
7.4.250.0070.00016.79
7.4.240.0020.00616.92
7.4.230.0000.00816.88
7.4.220.0070.00016.88
7.4.210.0070.00917.06
7.4.200.0080.00016.66
7.4.130.0160.00516.75
7.4.120.0100.01316.79
7.4.110.0090.00916.93
7.4.100.0120.00616.93
7.4.90.0150.00616.77
7.4.80.0090.01219.39
7.4.70.0090.00616.86
7.4.60.0090.00916.70
7.4.50.0070.01016.86
7.4.40.0110.01116.67
7.4.30.0120.00616.71
7.4.20.0090.00916.83
7.4.10.0070.01616.47
7.4.00.0070.01016.85
7.3.330.0030.00316.81
7.3.320.0030.00313.43
7.3.310.0070.00016.65
7.3.300.0030.00316.64
7.3.290.0080.00916.78
7.3.280.0070.01916.60
7.3.260.0150.00916.88
7.3.240.0120.00616.77
7.3.230.0210.00316.78
7.3.210.0100.00717.00
7.3.200.0100.00716.74
7.3.190.0030.01316.86
7.3.180.0070.01016.76
7.3.170.0100.00616.62
7.3.160.0110.00716.83
7.3.150.0080.01116.76
7.3.140.0060.01616.54
7.3.130.0100.01016.88
7.3.120.0030.01316.90
7.3.110.0070.01016.87
7.3.100.0000.01616.86
7.3.90.0080.01416.66
7.3.80.0060.01216.79
7.3.70.0120.00416.79
7.3.60.0130.00316.69
7.3.50.0100.00616.70
7.3.40.0120.00816.80
7.3.30.0000.01716.71
7.3.20.0080.00916.70
7.3.10.0130.00416.72
7.3.00.0160.00016.88
7.2.330.0110.01117.10
7.2.320.0040.01416.84
7.2.310.0050.01416.94
7.2.300.0100.01416.98
7.2.290.0130.00316.98
7.2.280.0000.01917.03
7.2.270.0130.01317.10
7.2.260.0090.00817.13
7.2.250.0060.01017.09
7.2.240.0060.01016.74
7.2.230.0000.02117.17
7.2.220.0160.00316.80
7.2.210.0100.01017.17
7.2.200.0060.01116.97
7.2.190.0080.00816.89
7.2.180.0210.00016.81
7.2.170.0150.00216.86
7.2.160.0110.00516.72
7.2.150.0090.00817.05
7.2.140.0030.01517.02
7.2.130.0140.00417.03
7.2.120.0140.00717.02
7.2.110.0070.01017.13
7.2.100.0040.01816.96
7.2.90.0220.00017.12
7.2.80.0060.01616.91
7.2.70.0090.00916.89
7.2.60.0040.01417.14
7.2.50.0090.00916.91
7.2.40.0100.00717.02
7.2.30.0110.00717.00
7.2.20.0190.00616.79
7.2.10.0120.00817.03
7.2.00.0120.00617.04

preferences:
34.3 ms | 403 KiB | 5 Q