3v4l.org

run code in 300+ PHP versions simultaneously
<?php // from your file $xml = ' <div class="DetailsPanel"> <label class="ListLabel left">Location</label> <span id="location" class="ListDetail left" title="London, UK">London, UK</span> <label class="ListLabel left">Price</label> <span id="price" class="ListDetail left" title="£5000">£5000</span> <label class="ListLabel left">Sector</label> <span class="ListDetail left"> <a href="/">IT</a> <a href="/">ICT</a> </span> <label class="ListLabel left">Location</label> <span id="location" class="ListDetail left" title="London, UK">Derby, UK</span> <label class="ListLabel left">Price</label> <span id="price" class="ListDetail left" title="£1000">£1000</span> <label class="ListLabel left">Sector</label> <span class="ListDetail left"> <a href="/">Finance</a> </span> </div> '; $xmldoc = new DOMDocument(); //$xmldoc->load('yourFile.html'); $xmldoc->loadXML($xml); $xpath = new Domxpath($xmldoc); foreach($xpath->query("//div") as $node){ //$tag = $node->getAttribute('id'); $string = $node->nodeValue; echo $string . '|'; foreach($xpath->query("//div/label") as $node1){ $string = $node1->nodeValue; //echo $string . "\n"; if($string === 'Sector') { foreach ($xpath->query("//div/span/a") as $sector) { $string = $sector->nodeValue; //echo "Sector = " . $string . "\n"; } } if($string === 'Price') { foreach ($xpath->query("//div/span[@id='price']") as $price) { $string = $price->nodeValue; //echo "Price = " . $string . "\n"; } } } } ?>

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.70.0070.00716.88
8.3.60.0070.01418.53
8.3.50.0090.00922.24
8.3.40.0110.00719.31
8.3.30.0090.00619.46
8.3.20.0080.00020.94
8.3.10.0050.00322.54
8.3.00.0040.00420.99
8.2.180.0160.00616.88
8.2.170.0110.00422.96
8.2.160.0100.00319.66
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0000.00826.16
8.2.120.0040.00419.98
8.2.110.0090.00022.76
8.2.100.0080.00420.13
8.2.90.0040.00419.70
8.2.80.0040.00418.43
8.2.70.0040.00418.13
8.2.60.0000.00818.54
8.2.50.0030.00518.07
8.2.40.0040.00420.28
8.2.30.0030.00618.59
8.2.20.0030.00518.10
8.2.10.0040.00418.07
8.2.00.0030.00618.17
8.1.280.0100.01025.92
8.1.270.0000.00822.69
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0050.00524.17
8.1.230.0090.00319.62
8.1.220.0090.00018.01
8.1.210.0000.00818.77
8.1.200.0090.00017.72
8.1.190.0080.00018.02
8.1.180.0040.00419.20
8.1.170.0040.00419.01
8.1.160.0080.00022.46
8.1.150.0070.00019.07
8.1.140.0080.00017.90
8.1.130.0040.00418.31
8.1.120.0000.00717.74
8.1.110.0030.00618.01
8.1.100.0050.00317.82
8.1.90.0040.00417.71
8.1.80.0040.00417.72
8.1.70.0040.00417.95
8.1.60.0000.00917.86
8.1.50.0040.00417.88
8.1.40.0000.00917.77
8.1.30.0000.00817.88
8.1.20.0060.00318.07
8.1.10.0060.00318.05
8.1.00.0030.00618.01
8.0.300.0040.00418.77
8.0.290.0050.00217.80
8.0.280.0040.00418.93
8.0.270.0040.00417.66
8.0.260.0000.00817.25
8.0.250.0000.00717.23
8.0.240.0050.00317.27
8.0.230.0000.00817.32
8.0.220.0000.00917.24
8.0.210.0000.00717.18
8.0.200.0030.00317.41
8.0.190.0000.00817.27
8.0.180.0040.00417.23
8.0.170.0070.00017.21
8.0.160.0040.00417.35
8.0.150.0000.00717.36
8.0.140.0040.00417.19
8.0.130.0030.00313.66
8.0.120.0080.00017.36
8.0.110.0050.00317.39
8.0.100.0080.00017.27
8.0.90.0050.00317.38
8.0.80.0060.01217.34
8.0.70.0030.00517.30
8.0.60.0050.00217.29
8.0.50.0000.00817.09
8.0.30.0150.00817.58
8.0.20.0130.00717.53
8.0.10.0000.00717.32
8.0.00.0130.00517.05
7.4.330.0050.00015.55
7.4.320.0030.00316.99
7.4.300.0060.00016.97
7.4.290.0000.00716.93
7.4.280.0080.00016.86
7.4.270.0080.00017.10
7.4.260.0100.00016.91
7.4.250.0040.00416.93
7.4.240.0040.00316.97
7.4.230.0040.00417.00
7.4.220.0060.01916.95
7.4.210.0090.00516.98
7.4.200.0000.00716.98
7.4.190.0000.00716.92
7.4.160.0060.01016.88
7.4.150.0130.00617.40
7.4.140.0120.01017.86
7.4.130.0080.01316.90
7.4.120.0070.01016.92
7.4.110.0090.01516.96
7.4.100.0090.00916.77
7.4.90.0030.01316.90
7.4.80.0070.01019.39
7.4.70.0100.01016.84
7.4.60.0080.01217.02
7.4.50.0030.00517.06
7.4.40.0060.00922.77
7.4.30.0140.00317.01
7.4.10.0030.01315.07
7.4.00.0070.00815.15
7.3.330.0000.00513.66
7.3.320.0030.00313.36
7.3.310.0040.00416.82
7.3.300.0000.00716.64
7.3.290.0060.00916.80
7.3.280.0130.00616.77
7.3.270.0130.01417.40
7.3.260.0130.00716.64
7.3.250.0120.00516.90
7.3.240.0190.00416.84
7.3.230.0070.01116.80
7.3.210.0090.01216.82
7.3.200.0080.01119.39
7.3.190.0130.00616.92
7.3.180.0030.01316.98
7.3.170.0160.00716.95
7.3.160.0080.00816.96
7.3.130.0060.01215.15
7.3.120.0030.01414.97
7.3.110.0090.00915.20
7.3.100.0060.00915.11
7.3.90.0120.00315.16
7.3.80.0090.00014.93
7.3.70.0060.00914.96
7.3.60.0040.00815.12
7.3.50.0030.01214.79
7.3.40.0080.00414.87
7.3.30.0150.00414.86
7.3.20.0030.01316.77
7.3.10.0100.00616.70
7.3.00.0060.00716.79
7.2.330.0090.01217.14
7.2.320.0060.01217.03
7.2.310.0100.01316.87
7.2.300.0070.01017.10
7.2.290.0100.00617.14
7.2.260.0100.00715.45
7.2.250.0100.00715.54
7.2.240.0060.00915.49
7.2.230.0030.01415.37
7.2.220.0040.01415.59
7.2.210.0000.00915.33
7.2.200.0130.00315.20
7.2.190.0000.01415.32
7.2.180.0060.00315.19
7.2.170.0050.00515.25
7.2.160.0060.01215.25
7.2.150.0100.00317.33
7.2.140.0030.00616.94
7.2.130.0070.00717.18
7.2.120.0030.01117.05
7.2.110.0030.01017.22
7.2.100.0070.00817.11
7.2.90.0080.00617.16
7.2.80.0090.00817.13
7.2.70.0060.00917.06
7.2.60.0090.00717.13
7.2.50.0090.00617.20
7.2.40.0080.00817.04
7.2.30.0040.01017.07
7.2.20.0090.00517.05
7.2.10.0060.00917.04
7.2.00.0060.00917.62
7.1.330.0070.00715.84
7.1.320.0030.01315.97
7.1.310.0030.01015.78
7.1.300.0000.01415.96
7.1.290.0090.00015.86
7.1.280.0000.01716.09
7.1.270.0120.00616.02
7.1.260.0070.00316.02
7.1.250.0070.00915.85
7.1.240.0020.00915.95
7.1.230.0090.00715.91
7.1.220.0070.00716.07
7.1.210.0050.00915.89
7.1.200.0090.00516.18
7.1.190.0080.00715.79
7.1.180.0090.00915.80
7.1.170.0060.00915.84
7.1.160.0100.00516.05
7.1.150.0060.00815.87
7.1.140.0070.00715.88
7.1.130.0060.00616.02
7.1.120.0060.00615.91
7.1.110.0080.00615.94
7.1.100.0060.00916.54
7.1.90.0120.00715.96
7.1.80.0060.00915.82
7.1.70.0070.00516.44
7.1.60.0090.01317.24
7.1.50.0070.01016.34
7.1.40.0070.00515.78
7.1.30.0090.00815.88
7.1.20.0100.00716.04
7.1.10.0090.00615.82
7.1.00.0050.03018.19
7.0.330.0030.00815.52
7.0.320.0040.00915.58
7.0.310.0080.00515.42
7.0.300.0020.00915.68
7.0.290.0050.00815.34
7.0.280.0070.00515.33
7.0.270.0050.00715.54
7.0.260.0070.00615.41
7.0.250.0020.01115.56
7.0.240.0110.00515.60
7.0.230.0020.01215.53
7.0.220.0080.00515.51
7.0.210.0090.00715.50
7.0.200.0060.00816.09
7.0.190.0120.00615.67
7.0.180.0040.00915.48
7.0.170.0080.00615.58
7.0.160.0100.01015.56
7.0.150.0050.01215.50
7.0.140.0100.02917.72
7.0.130.0080.01215.51
7.0.120.0090.00815.50
7.0.110.0330.02717.03
7.0.100.0230.03417.06
7.0.90.0260.02617.12
7.0.80.0240.03217.04
7.0.70.0220.03516.96
7.0.60.0300.01917.05
7.0.50.0270.02917.28
7.0.40.0090.03115.89
7.0.30.0040.03415.69
7.0.20.0060.03315.64
7.0.10.0060.03115.72
7.0.00.0090.02615.84
5.6.400.0070.00714.65
5.6.390.0000.01514.66
5.6.380.0020.01214.34
5.6.370.0060.00914.51
5.6.360.0070.00314.55
5.6.350.0100.00614.54
5.6.340.0050.00714.48
5.6.330.0090.00514.55
5.6.320.0040.00914.52
5.6.310.0070.00814.57
5.6.300.0080.00714.39
5.6.290.0080.00714.59
5.6.280.0070.02916.68
5.6.270.0080.00314.68
5.6.260.0070.02616.76
5.6.250.0080.03216.48
5.6.240.0020.04016.85
5.6.230.0070.03116.72
5.6.220.0080.02916.58
5.6.210.0070.03016.58
5.6.200.0080.03216.82
5.6.190.0030.03416.86
5.6.180.0070.03216.75
5.6.170.0060.03416.71
5.6.160.0060.02216.73
5.6.150.0050.02816.71
5.6.140.0090.03116.71
5.6.130.0040.03516.88
5.6.120.0050.03516.67
5.6.110.0080.02016.69
5.6.100.0080.01716.82
5.6.90.0030.02716.63
5.6.80.0030.01916.61
5.6.70.0090.01416.49
5.6.60.0060.01816.65
5.6.50.0050.01616.50
5.6.40.0090.02916.40
5.6.30.0050.01616.59
5.6.20.0050.01816.48
5.6.10.0070.01516.43
5.6.00.0080.01616.33
5.5.380.0040.03215.44
5.5.370.0050.03215.49
5.5.360.0070.03015.27
5.5.350.0080.03015.29
5.5.340.0060.02315.49
5.5.330.0090.03015.54
5.5.320.0080.02915.68
5.5.310.0030.03115.53
5.5.300.0070.02815.48
5.5.290.0070.02915.52
5.5.280.0020.03615.54
5.5.270.0070.03015.59
5.5.260.0010.02215.56
5.5.250.0020.02015.42
5.5.240.0060.01515.35
5.5.230.0020.02015.29
5.5.220.0040.03015.25
5.5.210.0070.02115.28
5.5.200.0050.01615.09
5.5.190.0070.01415.34
5.5.180.0040.01815.24
5.5.170.0040.00712.68
5.5.160.0080.02515.27
5.5.150.0050.01715.29
5.5.140.0080.01615.31
5.5.130.0050.01715.29
5.5.120.0050.01715.32
5.5.110.0060.01615.28
5.5.100.0050.02015.24
5.5.90.0060.01615.13
5.5.80.0050.02515.14
5.5.70.0070.01615.25
5.5.60.0050.01615.28
5.5.50.0060.02815.20
5.5.40.0000.02215.23
5.5.30.0030.01615.23
5.5.20.0050.01215.03
5.5.10.0020.01715.20
5.5.00.0050.02015.27
5.4.450.0060.03114.12
5.4.440.0080.02814.01
5.4.430.0000.02213.99
5.4.420.0050.01613.88
5.4.410.0030.02713.80
5.4.400.0030.02413.83
5.4.390.0040.01713.72
5.4.380.0060.01613.77
5.4.370.0050.02913.97
5.4.360.0050.01813.83
5.4.350.0040.01713.82
5.4.340.0060.01613.78
5.4.330.0030.00411.16
5.4.320.0070.01613.84
5.4.310.0040.02213.83
5.4.300.0030.01813.88
5.4.290.0080.01313.86
5.4.280.0060.02313.95
5.4.270.0060.01613.82
5.4.260.0060.01713.86
5.4.250.0100.01213.75
5.4.240.0050.01413.78
5.4.230.0060.01513.79
5.4.220.0040.02013.73
5.4.210.0050.01813.90
5.4.200.0010.02113.88
5.4.190.0040.01813.82
5.4.180.0040.02113.75
5.4.170.0020.01713.77
5.4.160.0040.02313.82
5.4.150.0020.01813.81
5.4.140.0070.02612.97
5.4.130.0050.02812.96
5.4.120.0070.02412.91
5.4.110.0070.02512.94
5.4.100.0060.02612.93
5.4.90.0060.03012.91
5.4.80.0030.02112.96
5.4.70.0080.02412.79
5.4.60.0070.02512.84
5.4.50.0060.02212.83
5.4.40.0060.02812.92
5.4.30.0050.02312.83
5.4.20.0020.01812.84
5.4.10.0050.02112.98
5.4.00.0020.03012.74
5.3.290.0100.02712.26
5.3.280.0050.01612.28
5.3.270.0040.02112.26
5.3.260.0050.02212.25
5.3.250.0010.02012.24
5.3.240.0010.03412.27
5.3.230.0110.02212.27
5.3.220.0010.02112.26
5.3.210.0030.01512.25
5.3.200.0080.02512.26
5.3.190.0050.02912.25
5.3.180.0050.02912.29
5.3.170.0050.02212.25
5.3.160.0070.02512.30
5.3.150.0040.02812.25
5.3.140.0070.02112.24
5.3.130.0060.02612.29
5.3.120.0090.02212.26
5.3.110.0060.02712.25
5.3.100.0040.03212.12
5.3.90.0080.02412.07
5.3.80.0040.03012.06
5.3.70.0040.02612.07
5.3.60.0050.01812.09
5.3.50.0040.02812.05
5.3.40.0110.02212.03
5.3.30.0030.03012.04
5.3.20.0050.02411.95
5.3.10.0030.02011.98
5.3.00.0050.02111.95
5.2.170.0100.02811.75
5.2.160.0090.03011.75
5.2.150.0070.02011.75
5.2.140.0030.03111.75
5.2.130.0070.03011.75
5.2.120.0030.01911.75
5.2.110.0040.03511.75
5.2.100.0060.03111.75
5.2.90.0080.02611.75
5.2.80.0090.02711.75
5.2.70.0090.03011.75
5.2.60.0030.02111.75
5.2.50.0050.02911.75
5.2.40.0050.03311.75
5.2.30.0080.03011.75
5.2.20.0020.03311.75
5.2.10.0060.02811.75
5.2.00.0100.03011.75
5.1.60.0120.01011.75
5.1.50.0090.02411.75
5.1.40.0060.02511.75
5.1.30.0090.02511.75
5.1.20.0050.02911.75
5.1.10.0100.02311.75
5.1.00.0060.03011.75
5.0.50.0080.02011.75
5.0.40.0030.02611.75
5.0.30.0030.03611.75
5.0.20.0020.02611.75
5.0.10.0030.02411.75
5.0.00.0040.03011.75
4.4.90.0070.01511.75
4.4.80.0040.01811.75
4.4.70.0030.01811.75
4.4.60.0030.01711.75
4.4.50.0000.02311.75
4.4.40.0050.02711.75
4.4.30.0040.01511.75
4.4.20.0020.02111.75
4.4.10.0020.01111.75
4.4.00.0020.03011.75
4.3.110.0020.01611.75
4.3.100.0020.01911.75
4.3.90.0030.01511.75
4.3.80.0000.03211.75
4.3.70.0000.02211.75
4.3.60.0030.01811.75
4.3.50.0020.01511.75
4.3.40.0000.02711.75
4.3.30.0020.02011.75
4.3.20.0020.01511.75
4.3.10.0010.02011.75
4.3.00.0040.01511.75

preferences:
57.58 ms | 401 KiB | 5 Q