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> </div> <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> </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.60.0130.00618.57
8.3.50.0090.00522.22
8.3.40.0040.01219.26
8.3.30.0090.00619.54
8.3.20.0040.00420.71
8.3.10.0050.00322.59
8.3.00.0040.00421.07
8.2.180.0110.00717.00
8.2.170.0040.01122.96
8.2.160.0070.00719.48
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.74
8.2.110.0060.00619.68
8.2.100.0080.00420.07
8.2.90.0040.00419.75
8.2.80.0080.00018.30
8.2.70.0090.00317.88
8.2.60.0090.00018.30
8.2.50.0030.00618.07
8.2.40.0030.00520.51
8.2.30.0040.00418.43
8.2.20.0080.00018.16
8.2.10.0050.00318.10
8.2.00.0080.00018.18
8.1.280.0040.01125.92
8.1.270.0040.00422.60
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0030.00621.37
8.1.230.0000.01119.60
8.1.220.0000.01018.16
8.1.210.0040.00418.77
8.1.200.0000.00917.72
8.1.190.0000.00817.78
8.1.180.0040.00419.03
8.1.170.0000.00819.23
8.1.160.0030.00522.51
8.1.150.0000.00719.00
8.1.140.0040.00417.89
8.1.130.0000.00818.17
8.1.120.0030.00617.93
8.1.110.0040.00417.95
8.1.100.0030.00318.00
8.1.90.0040.00317.94
8.1.80.0000.00717.91
8.1.70.0080.00017.92
8.1.60.0090.00017.84
8.1.50.0000.00817.88
8.1.40.0050.00317.86
8.1.30.0040.00417.91
8.1.20.0020.00518.03
8.1.10.0000.00718.05
8.1.00.0040.00417.91
8.0.300.0000.00718.77
8.0.290.0060.00317.68
8.0.280.0080.00018.98
8.0.270.0040.00417.71
8.0.260.0040.00417.30
8.0.250.0030.00317.37
8.0.240.0040.00417.42
8.0.230.0000.00717.56
8.0.220.0070.00017.47
8.0.210.0070.00017.45
8.0.200.0030.00317.38
8.0.190.0040.00417.51
8.0.180.0040.00417.44
8.0.170.0000.00717.28
8.0.160.0000.00817.16
8.0.150.0070.00317.47
8.0.140.0080.00017.39
8.0.130.0050.00013.81
8.0.120.0060.00317.43
8.0.110.0040.00417.13
8.0.100.0020.00517.46
8.0.90.0040.00417.18
8.0.80.0080.00817.23
8.0.70.0000.00817.33
8.0.60.0000.00717.46
8.0.50.0030.00517.15
8.0.30.0090.01117.51
8.0.20.0090.01017.53
8.0.10.0040.00417.49
8.0.00.0100.01017.21
7.4.330.0050.00015.62
7.4.320.0000.00617.03
7.4.300.0030.00316.91
7.4.290.0030.00716.91
7.4.280.0000.00716.85
7.4.270.0030.00316.96
7.4.260.0070.00316.92
7.4.250.0040.00416.99
7.4.240.0030.00416.92
7.4.230.0000.00716.85
7.4.220.0110.00717.14
7.4.210.0060.01017.01
7.4.200.0000.00716.99
7.4.190.0030.00316.96
7.4.160.0090.00916.84
7.4.150.0070.01117.40
7.4.140.0160.00517.86
7.4.130.0080.01217.07
7.4.120.0100.00816.99
7.4.110.0100.01016.95
7.4.100.0080.01117.02
7.4.90.0060.01216.87
7.4.80.0040.01219.39
7.4.70.0100.01317.00
7.4.60.0030.01317.03
7.4.50.0060.00316.81
7.4.40.0040.01522.77
7.4.30.0150.00616.88
7.4.10.0060.01215.09
7.4.00.0050.01215.12
7.3.330.0050.00013.18
7.3.320.0000.00513.33
7.3.310.0050.00316.55
7.3.300.0040.00416.51
7.3.290.0070.00716.64
7.3.280.0090.00816.56
7.3.270.0160.00617.40
7.3.260.0120.00616.70
7.3.250.0100.00816.79
7.3.240.0090.00916.88
7.3.230.0100.00716.95
7.3.210.0060.01216.69
7.3.200.0100.00719.39
7.3.190.0150.00316.67
7.3.180.0060.01116.79
7.3.170.0100.00716.73
7.3.160.0070.01016.94
7.3.130.0110.00715.09
7.3.120.0110.00714.81
7.3.110.0080.01114.92
7.3.100.0100.00514.90
7.3.90.0050.00914.87
7.3.80.0050.00814.89
7.3.70.0050.01214.86
7.3.60.0080.00714.90
7.3.50.0060.00914.84
7.3.40.0090.00714.93
7.3.30.0070.00614.79
7.3.20.0060.00716.67
7.3.10.0070.00516.70
7.3.00.0080.00716.70
7.2.330.0070.01416.77
7.2.320.0170.00317.02
7.2.310.0130.00916.93
7.2.300.0090.00616.65
7.2.290.0130.00316.90
7.2.260.0000.01415.00
7.2.250.0070.00915.11
7.2.240.0050.01315.04
7.2.230.0030.01415.05
7.2.220.0060.01015.05
7.2.210.0070.00915.23
7.2.200.0040.00915.21
7.2.190.0070.00915.19
7.2.180.0100.00515.08
7.2.170.0030.01015.03
7.2.160.0070.01014.96
7.2.150.0100.00617.14
7.2.140.0030.00717.01
7.2.130.0070.00716.93
7.2.120.0070.00716.96
7.2.110.0060.00716.83
7.2.100.0070.00816.93
7.2.90.0070.00617.05
7.2.80.0070.00516.95
7.2.70.0070.00617.04
7.2.60.0040.01016.84
7.2.50.0070.00416.93
7.2.40.0060.00816.96
7.2.30.0050.00817.07
7.2.20.0050.00816.85
7.2.10.0050.00917.03
7.2.00.0040.00917.03
7.1.330.0030.01215.82
7.1.320.0080.00615.88
7.1.310.0050.01015.91
7.1.300.0050.00915.86
7.1.290.0090.00615.78
7.1.280.0070.00715.79
7.1.270.0050.00915.89
7.1.260.0060.00815.94
7.1.250.0060.00515.70
7.1.240.0030.01015.85
7.1.230.0070.00715.86
7.1.220.0040.01115.59
7.1.210.0060.00915.69
7.1.200.0040.00715.75
7.1.190.0030.00615.87
7.1.180.0000.01515.64
7.1.170.0040.01115.99
7.1.160.0040.00415.95
7.1.150.0070.00715.80
7.1.140.0060.00815.75
7.1.130.0080.00415.87
7.1.120.0030.01015.95
7.1.110.0100.00615.84
7.1.100.0000.01315.96
7.1.90.0060.00915.73
7.1.80.0030.01015.92
7.1.70.0040.00716.47
7.1.60.0060.01217.81
7.1.50.0090.00716.58
7.1.40.0030.01015.92
7.1.30.0060.00615.78
7.1.20.0090.00615.84
7.1.10.0060.00615.82
7.1.00.0090.03819.13
7.0.330.0030.00915.32
7.0.320.0040.00815.68
7.0.310.0090.00315.54
7.0.300.0060.00615.29
7.0.290.0070.00715.48
7.0.280.0040.00415.38
7.0.270.0000.01015.39
7.0.260.0110.00415.49
7.0.250.0040.00415.44
7.0.240.0060.00915.58
7.0.230.0060.00615.66
7.0.220.0000.01415.59
7.0.210.0080.00815.42
7.0.200.0090.00416.09
7.0.190.0060.00915.53
7.0.180.0030.00615.55
7.0.170.0030.00615.64
7.0.160.0040.01115.39
7.0.150.0040.00415.69
7.0.140.0070.03919.00
7.0.130.0090.00615.68
7.0.120.0030.00715.50
7.0.110.0030.00715.73
7.0.100.0060.00615.52
7.0.90.0090.00615.43
7.0.80.0040.01115.52
7.0.70.0120.00015.86
7.0.60.0070.02517.84
7.0.50.0090.04016.89
7.0.40.0070.04717.05
7.0.30.0120.02516.89
7.0.20.0170.02716.96
7.0.10.0070.02216.95
7.0.00.0070.02917.03
5.6.400.0030.01314.27
5.6.390.0040.00814.50
5.6.380.0070.01014.28
5.6.370.0000.01314.78
5.6.360.0070.00314.61
5.6.350.0060.00914.71
5.6.340.0110.00414.91
5.6.330.0040.01214.49
5.6.320.0070.00314.32
5.6.310.0040.00414.56
5.6.300.0080.00414.70
5.6.290.0070.00714.35
5.6.280.0050.03817.73
5.6.270.0080.00014.25
5.6.260.0080.00014.58
5.6.250.0060.00914.51
5.6.240.0060.00914.57
5.6.230.0110.00314.82
5.6.220.0100.00714.83
5.6.210.0080.02117.59
5.6.200.0140.03716.40
5.6.190.0040.04717.66
5.6.180.0230.03717.70
5.6.170.0240.03417.56
5.6.160.0070.02217.58
5.6.150.0070.04516.58
5.6.140.0090.03916.33
5.6.130.0030.04516.43
5.6.120.0080.04517.79
5.6.110.0100.03017.82
5.6.100.0080.04317.71
5.6.90.0030.05017.86
5.6.80.0100.03017.42
5.6.70.2090.02117.47
5.6.60.0080.00314.34
5.6.50.0060.00614.39
5.6.40.0030.01314.38
5.6.30.0060.00914.48
5.6.20.0000.01414.37
5.6.10.0060.00614.37
5.6.00.0130.00314.66
5.5.380.0080.00414.32
5.5.370.0060.00914.43
5.5.360.0040.01114.38
5.5.350.0060.04317.69
5.5.340.0070.04116.40
5.5.330.0050.02517.34
5.5.320.0160.03417.38
5.5.310.0170.02417.51
5.5.300.0050.04716.18
5.5.290.0080.04416.29
5.5.280.0060.04317.57
5.5.270.0030.04917.64
5.5.260.0070.03017.68
5.5.250.0030.04517.65
5.5.240.0050.04417.33
5.5.230.0030.00714.50
5.5.220.0110.00314.38
5.5.210.0070.00714.33
5.5.200.0060.00314.25
5.5.190.0030.01014.30
5.5.180.0060.00614.31
5.5.170.0100.00314.51
5.5.160.0030.01214.49
5.5.150.0040.01114.49
5.5.140.0030.00914.23
5.5.130.0000.01114.48
5.5.120.0140.00014.56
5.5.110.0060.00514.17
5.5.100.0000.00814.36
5.5.90.0030.01014.63
5.5.80.0060.00814.06
5.5.70.0110.00414.35
5.5.60.0050.00514.29
5.5.50.0040.00814.19
5.5.40.0120.00314.20
5.5.30.0040.01114.54
5.5.20.0100.00314.43
5.5.10.0030.01013.97
5.5.00.0000.01114.16
5.4.450.0320.03016.21
5.4.440.0200.04016.29
5.4.430.0180.02816.20
5.4.420.0250.03016.25
5.4.410.0200.03216.16
5.4.400.0420.00315.78
5.4.390.0470.00215.91
5.4.380.0170.03415.92
5.4.370.0120.03015.90
5.4.360.0220.02615.90
5.4.350.0140.03215.90
5.4.340.0130.03115.84
5.4.330.0080.00312.90
5.4.320.0050.02512.83
5.4.310.0030.02412.83
5.4.300.0040.02412.83
5.4.290.0040.02912.83
5.4.280.0050.02212.78
5.4.270.0070.01912.79
5.4.260.0080.02615.96
5.4.250.0110.02615.94
5.4.240.0070.03016.05
5.4.230.0120.02516.06
5.4.220.0070.02815.95
5.4.210.0020.03315.95
5.4.200.0080.02815.96
5.4.190.0030.03215.85
5.4.180.0020.03515.96
5.4.170.0050.02815.98
5.4.160.0080.02715.87
5.4.150.0090.03115.97
5.4.140.0120.02714.66
5.4.130.0100.02514.79
5.4.120.0100.02214.67
5.4.110.0050.03014.70
5.4.100.0100.02514.86
5.4.90.0050.02914.84
5.4.80.0070.02714.71
5.4.70.0050.03114.61
5.4.60.0060.02814.75
5.4.50.0030.02814.71
5.4.40.0080.02714.79
5.4.30.0080.02314.83
5.4.20.0050.02614.65
5.4.10.0120.02414.84
5.4.00.0050.02514.39
5.3.290.0050.02512.96
5.3.280.0060.03013.92
5.3.270.0000.03313.83
5.3.260.0060.02613.88
5.3.250.0110.03113.82
5.3.240.0030.03513.81
5.3.230.0080.03813.83
5.3.220.0060.02913.82
5.3.210.0030.03213.79
5.3.200.0000.03713.82
5.3.190.0080.03213.88
5.3.180.0070.02713.81
5.3.170.0080.02613.88
5.3.160.0070.02713.88
5.3.150.0080.02513.82
5.3.140.0050.02913.83
5.3.130.0060.02813.81
5.3.120.0030.03113.88
5.3.110.0050.02813.80
5.3.100.0090.02313.66
5.3.90.0120.02013.52
5.3.80.0030.03013.58
5.3.70.0020.03113.57
5.3.60.0020.03213.53
5.3.50.0050.02913.52
5.3.40.0080.03513.49
5.3.30.0070.02513.49
5.3.20.0060.02513.48
5.3.10.0050.02813.44
5.3.00.0070.02513.43
5.2.170.0100.04011.34
5.2.160.0070.04011.51
5.2.150.0130.03711.47
5.2.140.0030.05311.48
5.2.130.0070.03711.41
5.2.120.0030.04011.20
5.2.110.0100.05311.26
5.2.100.0030.04011.21
5.2.90.0130.03011.43
5.2.80.0000.04711.32
5.2.70.0100.04011.24
5.2.60.0070.03711.21
5.2.50.0000.04311.13
5.2.40.0030.04011.20
5.2.30.0030.04011.08
5.2.20.0030.04011.19
5.2.10.0030.04011.09
5.2.00.0030.04010.96
5.1.60.0070.03010.16
5.1.50.0100.03010.13
5.1.40.0070.03010.14
5.1.30.0000.04310.58
5.1.20.0030.03710.50
5.1.10.0000.04310.28
5.1.00.0170.04010.22
5.0.50.0070.0339.41
5.0.40.0000.0309.41
5.0.30.0070.0579.41
5.0.20.0070.0279.41
5.0.10.0200.0239.41
5.0.00.0030.0679.41
4.4.90.0000.0239.41
4.4.80.0100.0239.41
4.4.70.0070.0179.41
4.4.60.0030.0209.41
4.4.50.0000.0209.41
4.4.40.0000.0379.41
4.4.30.0030.0209.41
4.4.20.0000.0239.41
4.4.10.0070.0279.41
4.4.00.0000.0379.41
4.3.110.0000.0239.41
4.3.100.0100.0139.41
4.3.90.0000.0279.41
4.3.80.0000.0339.41
4.3.70.0070.0179.41
4.3.60.0000.0209.41
4.3.50.0030.0209.41
4.3.40.0000.0439.41
4.3.30.0000.0309.41
4.3.20.0030.0209.41
4.3.10.0030.0209.41
4.3.00.0100.0209.27

preferences:
50.97 ms | 401 KiB | 5 Q