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.0120.00917.00
8.3.60.0180.00318.68
8.3.50.0150.00322.30
8.3.40.0070.00718.96
8.3.30.0000.01419.49
8.3.20.0080.00020.58
8.3.10.0000.00822.25
8.3.00.0030.00621.08
8.2.180.0120.00317.00
8.2.170.0110.00422.96
8.2.160.0150.00019.60
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.74
8.2.110.0070.00321.02
8.2.100.0060.00618.34
8.2.90.0000.00819.86
8.2.80.0000.00818.15
8.2.70.0100.00017.74
8.2.60.0080.00018.28
8.2.50.0090.00018.07
8.2.40.0000.00920.57
8.2.30.0000.00818.43
8.2.20.0030.00617.97
8.2.10.0040.00418.08
8.2.00.0030.00518.08
8.1.280.0110.01125.92
8.1.270.0000.00922.64
8.1.260.0030.00526.35
8.1.250.0000.00828.09
8.1.240.0060.00624.20
8.1.230.0040.00821.38
8.1.220.0090.00018.03
8.1.210.0090.00018.77
8.1.200.0060.00617.73
8.1.190.0000.00717.89
8.1.180.0060.00319.27
8.1.170.0000.00820.75
8.1.160.0040.00422.43
8.1.150.0000.00819.08
8.1.140.0030.00617.95
8.1.130.0080.00018.31
8.1.120.0000.00717.72
8.1.110.0040.00417.98
8.1.100.0000.00817.92
8.1.90.0030.00617.95
8.1.80.0030.00518.00
8.1.70.0030.00317.96
8.1.60.0030.00618.08
8.1.50.0000.00817.92
8.1.40.0030.00518.00
8.1.30.0050.00317.93
8.1.20.0000.00918.11
8.1.10.0000.00818.11
8.1.00.0030.00517.93
8.0.300.0040.00418.77
8.0.290.0040.00417.68
8.0.280.0040.00418.81
8.0.270.0080.00017.68
8.0.260.0070.00017.14
8.0.250.0030.00317.16
8.0.240.0030.00317.21
8.0.230.0000.00717.32
8.0.220.0050.00217.26
8.0.210.0030.00317.30
8.0.200.0000.00717.33
8.0.190.0080.00017.33
8.0.180.0040.00417.43
8.0.170.0070.00017.40
8.0.160.0000.00817.09
8.0.150.0000.00917.25
8.0.140.0030.00617.32
8.0.130.0030.00313.85
8.0.120.0050.00317.33
8.0.110.0000.00817.14
8.0.100.0000.00817.21
8.0.90.0050.00317.39
8.0.80.0120.00617.28
8.0.70.0040.00417.38
8.0.60.0000.00817.32
8.0.50.0040.00417.38
8.0.30.0060.01417.63
8.0.20.0130.00617.42
8.0.10.0000.00717.56
8.0.00.0040.01317.17
7.4.330.0050.00015.57
7.4.320.0000.00617.04
7.4.300.0000.00717.05
7.4.290.0030.00317.07
7.4.280.0040.00417.04
7.4.270.0000.00716.87
7.4.260.0000.00716.99
7.4.250.0030.00717.02
7.4.240.0060.00216.93
7.4.230.0040.00417.13
7.4.220.0060.01216.98
7.4.210.0080.01116.98
7.4.200.0000.00717.05
7.4.190.0000.00817.06
7.4.160.0060.01616.75
7.4.150.0110.00917.40
7.4.140.0110.01017.86
7.4.130.0120.00616.90
7.4.120.0090.00916.93
7.4.110.0100.00716.79
7.4.100.0110.01116.93
7.4.90.0090.00916.90
7.4.80.0090.00919.39
7.4.70.0060.01316.83
7.4.60.0140.00316.91
7.4.50.0030.00316.88
7.4.40.0030.01222.77
7.4.30.0120.00616.69
7.4.00.0130.00315.26
7.3.330.0000.00513.40
7.3.320.0050.00013.50
7.3.310.0000.00716.81
7.3.300.0060.00016.66
7.3.290.0110.00316.78
7.3.280.0070.01016.69
7.3.270.0180.00617.40
7.3.260.0120.00616.91
7.3.250.0070.01116.83
7.3.240.0150.00616.87
7.3.230.0090.00916.77
7.3.210.0110.01116.65
7.3.200.0130.00919.39
7.3.190.0160.00616.84
7.3.180.0110.00617.06
7.3.170.0110.00516.70
7.3.160.0120.00416.75
7.3.120.0120.00314.97
7.2.330.0230.00917.22
7.2.320.0090.00916.80
7.2.310.0000.01816.85
7.2.300.0100.01317.22
7.2.290.0070.01116.86
7.1.70.0000.01417.20
7.1.60.0120.01219.82
7.1.50.0080.00417.30
7.1.00.0100.06722.66
7.0.200.0070.00016.85
7.0.140.0070.07022.31
7.0.60.0070.08320.13
7.0.50.0070.03718.08
7.0.40.0070.04320.49
7.0.30.0270.06720.22
7.0.20.0270.05720.42
7.0.10.0330.03720.33
7.0.00.0100.07720.27
5.6.280.0030.07321.18
5.6.210.0100.07720.98
5.6.200.0100.04318.33
5.6.190.0070.09020.79
5.6.180.3500.04320.52
5.6.170.0270.05320.87
5.6.160.0070.04020.60
5.6.150.0030.06718.41
5.6.140.0070.07318.37
5.6.130.0030.04318.38
5.6.120.0100.05721.25
5.6.110.0170.05321.21
5.6.100.0030.04321.26
5.6.90.0100.04321.24
5.6.80.0200.07020.61
5.6.70.0270.07020.57
5.5.350.0000.07020.66
5.5.340.0030.05718.17
5.5.330.0030.04720.69
5.5.320.0230.04720.40
5.5.310.0330.07720.56
5.5.300.0100.04018.14
5.5.290.0170.07318.14
5.5.280.0070.03721.03
5.5.270.0130.07720.93
5.5.260.0030.04021.00
5.5.250.0130.07020.78
5.5.240.0100.06020.32
5.4.450.0400.07319.71
5.4.440.0630.04719.42
5.4.430.0130.05319.53
5.4.420.0170.05019.38
5.4.410.0100.05719.39
5.4.400.1130.00018.84
5.4.390.0670.00018.93
5.4.380.0370.05318.97
5.4.370.0470.04018.95
5.4.360.0200.05718.93
5.4.350.0300.05718.92
5.4.340.0370.04318.82
5.4.320.0090.03612.79
5.4.310.0040.04112.79
5.4.300.0030.04112.79
5.4.290.0030.04112.78
5.4.280.0080.03812.68
5.4.270.0100.03212.68
5.4.260.0030.08719.08
5.4.250.0070.05718.93
5.4.240.0030.06019.31
5.4.230.0100.05019.21
5.4.220.0100.05019.03
5.4.210.0070.05319.07
5.4.200.0130.04718.97
5.4.190.0170.04718.86
5.4.180.0070.05318.93
5.4.170.0030.06019.04
5.4.160.0100.06018.81
5.4.150.0130.04718.97
5.4.140.0030.05316.73
5.4.130.0130.04016.43
5.4.120.0200.05716.66
5.4.110.0030.07316.76
5.4.100.0230.03716.50
5.4.90.0100.04316.48
5.4.80.0030.05016.72
5.4.70.0130.04716.46
5.4.60.0100.04316.57
5.4.50.0070.04716.75
5.4.40.0070.05016.65
5.4.30.0070.04716.26
5.4.20.0030.05316.75
5.4.10.0070.06016.69
5.4.00.0130.04315.86
5.3.290.0070.04213.05
5.3.280.0070.05314.71
5.3.270.0100.05014.73
5.3.260.0000.06014.66
5.3.250.0100.06714.68
5.3.240.0100.05714.73
5.3.230.0130.05014.82
5.3.220.0070.05314.64
5.3.210.0000.05714.63
5.3.200.0130.04714.72
5.3.190.0030.05314.90
5.3.180.0070.05014.68
5.3.170.0070.04714.62
5.3.160.0170.06314.82
5.3.150.0130.04314.68
5.3.140.0070.04714.77
5.3.130.0030.05314.81
5.3.120.0170.07014.67
5.3.110.0070.05014.67
5.3.100.0100.07014.11
5.3.90.0100.04714.18
5.3.80.0170.07014.09
5.3.70.0130.04314.24
5.3.60.0030.05714.19
5.3.50.0070.05014.02
5.3.40.0130.04714.16
5.3.30.0000.05014.02
5.3.20.0130.04313.80
5.3.10.0030.05013.84
5.3.00.0070.04713.76
5.2.170.0100.03711.31
5.2.160.0170.04011.32
5.2.150.0030.04011.23
5.2.140.0000.04711.25
5.2.130.0030.04311.33
5.2.120.0030.03711.36
5.2.110.0100.03311.21
5.2.100.0030.04311.29
5.2.90.0170.04011.23
5.2.80.0000.04311.36
5.2.70.0030.04311.37
5.2.60.0100.03711.18
5.2.50.0000.06711.25
5.2.40.0000.04311.31
5.2.30.0100.04711.16
5.2.20.0000.04311.07
5.2.10.0070.04711.03
5.2.00.0030.04310.89
5.1.60.0130.02710.15
5.1.50.0100.03710.19
5.1.40.0000.04310.13
5.1.30.0070.03310.57
5.1.20.0070.03310.50
5.1.10.0170.04310.21
5.1.00.0100.04710.35
5.0.50.0070.0278.69
5.0.40.0100.0208.77
5.0.30.0030.0438.37
5.0.20.0070.0278.51
5.0.10.0000.0338.48
5.0.00.0070.0478.36
4.4.90.0000.0235.78
4.4.80.0070.0275.78
4.4.70.0000.0235.80
4.4.60.0030.0305.86
4.4.50.0070.0205.85
4.4.40.0070.0305.80
4.4.30.0030.0205.79
4.4.20.0000.0305.84
4.4.10.0070.0175.84
4.4.00.0070.0375.84
4.3.110.0000.0235.81
4.3.100.0030.0205.75
4.3.90.0000.0235.77
4.3.80.0070.0405.75
4.3.70.0000.0235.75
4.3.60.0070.0175.75
4.3.50.0000.0235.75
4.3.40.0000.0335.75
4.3.30.0030.0235.75
4.3.20.0030.0205.75
4.3.10.0000.0235.75
4.3.00.0030.0209.21

preferences:
50.98 ms | 404 KiB | 6 Q