3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="classA"> <a id="someID1"></a> <div class="class1"> <div class="class2"> <div class="class3"> <div class="class4"> <h4>name, name<small>string</small></h4> </div> <div> <h4>number<small>string</small></h4> </div> </div> </div> </div> </div> <div class="classA"> <a id="someID2"></a> <div class="class1"> <div class="class2"> <div class="class3"> <div class="class4"> <h4>nameA,nameA<small>stringA</small></h4> </div> <div> <h4>numberA<small>stringB</small></h4> </div> </div> </div> </div> </div>'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXpath($doc); $nodes = $xpath->query("//div[@class='classA' and a[@id='someID2']]")->item(0)->getElementsByTagName("h4"); echo $nodes->item(0)->nodeValue;

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.130.0100.00718.69
8.3.120.0030.00620.89
8.3.110.0040.00420.94
8.3.100.0080.00824.06
8.3.90.0030.00626.77
8.3.80.0090.00318.55
8.3.70.0060.00918.79
8.3.60.0070.01118.58
8.3.50.0080.00917.84
8.3.40.0110.01119.09
8.3.30.0130.00319.09
8.3.20.0050.00319.03
8.3.10.0060.00322.14
8.3.00.0070.00022.09
8.2.250.0030.00717.11
8.2.240.0060.00317.76
8.2.230.0060.00322.58
8.2.220.0110.00837.54
8.2.210.0090.00926.77
8.2.200.0060.00318.67
8.2.190.0120.00318.29
8.2.180.0120.00617.00
8.2.170.0060.00922.96
8.2.160.0110.00322.63
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.01421.38
8.2.110.0030.00619.58
8.2.100.0060.00618.16
8.2.90.0050.00318.13
8.2.80.0030.00617.97
8.2.70.0050.00318.30
8.2.60.0000.00918.47
8.2.50.0070.00318.10
8.2.40.0040.00420.90
8.2.30.0040.00420.96
8.2.20.0000.01018.37
8.2.10.0040.00418.48
8.2.00.0000.00818.57
8.1.300.0090.00018.95
8.1.290.0030.00618.88
8.1.280.0120.00325.92
8.1.270.0000.00820.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00621.18
8.1.230.0060.00618.21
8.1.220.0090.00018.03
8.1.210.0080.00018.77
8.1.200.0000.00817.73
8.1.190.0060.00319.26
8.1.180.0030.00618.10
8.1.170.0050.00319.01
8.1.160.0000.00819.14
8.1.150.0080.00019.19
8.1.140.0050.00319.23
8.1.130.0000.00920.60
8.1.120.0030.00517.79
8.1.110.0000.00717.78
8.1.100.0030.00617.80
8.1.90.0050.00317.57
8.1.80.0000.00817.78
8.1.70.0060.00317.69
8.1.60.0040.00417.84
8.1.50.0030.00517.85
8.1.40.0030.00517.85
8.1.30.0040.00417.84
8.1.20.0050.00317.98
8.1.10.0050.00317.86
8.1.00.0060.00317.92
8.0.300.0000.00718.77
8.0.290.0000.00917.25
8.0.280.0030.00318.83
8.0.270.0080.00017.61
8.0.260.0030.00320.43
8.0.250.0060.00317.32
8.0.240.0060.00317.30
8.0.230.0070.00017.30
8.0.220.0000.00817.05
8.0.210.0000.00817.16
8.0.200.0030.00317.26
8.0.190.0050.00317.23
8.0.180.0050.00317.13
8.0.170.0030.00617.18
8.0.160.0000.00717.20
8.0.150.0030.00317.11
8.0.140.0040.00417.13
8.0.130.0000.00613.56
8.0.120.0040.00417.04
8.0.110.0070.00017.07
8.0.100.0000.00717.27
8.0.90.0040.00417.20
8.0.80.0050.01217.14
8.0.70.0000.00817.02
8.0.60.0040.00417.33
8.0.50.0000.00717.16
8.0.30.0110.00717.45
8.0.20.0150.00417.40
8.0.10.0030.00517.33
8.0.00.0100.00917.09
7.4.330.0050.00015.55
7.4.320.0000.00617.00
7.4.300.0000.00616.94
7.4.290.0000.00816.92
7.4.280.0070.00417.00
7.4.270.0040.00416.75
7.4.260.0040.00416.75
7.4.250.0050.00216.84
7.4.240.0000.00816.95
7.4.230.0000.00816.92
7.4.220.0000.00816.71
7.4.210.0090.01017.00
7.4.200.0000.00716.71
7.4.160.0090.00916.75
7.4.140.0110.00717.86
7.4.130.0110.00716.80
7.4.120.0080.01116.86
7.4.110.0110.00616.68
7.4.100.0030.01416.95
7.4.90.0120.00616.83
7.4.80.0030.01319.39
7.4.70.0120.00616.86
7.4.60.0100.01016.76
7.4.50.0040.01516.89
7.4.40.0070.01616.74
7.4.00.0090.00814.98
7.3.330.0030.00313.30
7.3.320.0030.00313.36
7.3.310.0050.00216.34
7.3.300.0000.00716.59
7.3.290.0000.00716.50
7.3.280.0090.00816.47
7.3.260.0080.01016.77
7.3.240.0130.00516.70
7.3.230.0110.01416.66
7.3.210.0150.00316.65
7.3.200.0060.01016.71
7.3.190.0160.00016.88
7.3.180.0030.01316.54
7.3.170.0160.00016.61
7.3.160.0030.01316.87
7.3.120.0100.00815.00
7.3.110.0090.01114.88
7.3.100.0060.01214.70
7.3.90.0050.00714.90
7.3.80.0110.00414.75
7.3.70.0020.01014.80
7.3.60.0040.01114.82
7.3.50.0040.00614.85
7.3.40.0070.00514.83
7.3.30.0090.00714.89
7.3.20.0070.00716.80
7.3.10.0030.01016.49
7.3.00.0060.00716.72
7.2.330.0120.00617.07
7.2.320.0070.01116.76
7.2.310.0140.00516.89
7.2.300.0140.01216.72
7.2.290.0030.01717.02
7.2.250.0050.01415.10
7.2.240.0080.00815.11
7.2.230.0030.01214.98
7.2.220.0090.00515.17
7.2.210.0070.00714.82
7.2.200.0060.00815.12
7.2.190.0030.01015.22
7.2.180.0100.00515.19
7.2.170.0050.01015.16
7.2.160.0060.00914.99
7.2.150.0080.00816.85
7.2.140.0050.01016.86
7.2.130.0090.00616.83
7.2.120.0030.01016.88
7.2.110.0090.00217.01
7.2.100.1090.00915.59
7.2.90.1090.00915.66
7.2.80.1090.00715.59
7.2.70.1170.00715.77
7.2.60.1020.00915.87
7.2.50.1050.00615.75
7.2.40.1120.01115.88
7.2.30.1220.00415.78
7.2.20.0770.00715.65
7.2.10.0910.00715.71
7.2.00.0930.00815.86
7.1.330.0080.01015.79
7.1.320.0070.00615.89
7.1.310.0070.00615.75
7.1.300.0010.00815.67
7.1.290.0030.01215.84
7.1.280.0050.01215.75
7.1.270.0020.01215.81
7.1.260.0060.00915.57
7.1.250.0030.01115.89
7.1.240.0050.00815.99
7.1.230.0040.00715.87
7.1.220.1070.00814.60
7.1.210.1100.00814.73
7.1.200.1020.00414.68
7.1.190.1030.01014.70
7.1.180.1250.00714.60
7.1.170.1150.00514.62
7.1.160.0790.00914.60
7.1.150.0760.00714.55
7.1.140.1370.00814.57
7.1.130.1170.00814.61
7.1.120.1240.00914.62
7.1.110.0860.00414.54
7.1.100.0870.01014.67
7.1.90.0640.00614.58
7.1.80.0650.00514.70
7.1.70.0860.00714.64
7.1.60.0830.01025.40
7.1.50.1150.00825.46
7.1.40.0820.00825.42
7.1.30.1300.01025.30
7.1.20.0930.00925.38
7.1.10.0980.00614.70
7.1.00.0660.00814.62
7.0.330.0040.00815.48
7.0.320.0070.00715.45
7.0.310.0020.01115.66
7.0.300.0040.01015.66
7.0.290.0080.00815.56
7.0.280.0100.00215.60
7.0.270.0060.00615.59
7.0.260.0030.00715.66
7.0.250.0040.00915.55
7.0.240.0050.00815.55
7.0.230.0040.00915.68
7.0.220.0080.00415.40
7.0.210.0020.00915.39
7.0.200.0050.00815.57
7.0.190.0080.00715.59
7.0.180.0020.01015.44
7.0.170.0000.01115.53
7.0.160.0070.00515.53
7.0.150.0060.00615.53
7.0.140.0020.01315.40
7.0.130.0070.00615.58
7.0.120.0040.01215.52
7.0.110.0070.00715.40
7.0.100.0050.00715.50
7.0.90.0020.01215.29
7.0.80.0080.00415.73
7.0.70.0020.01115.45
7.0.60.0080.00515.51
7.0.50.0100.00315.51
7.0.40.0050.00713.58
7.0.30.0020.01113.49
7.0.20.0030.01013.71
7.0.10.0050.00413.56
7.0.00.0030.00813.58
5.6.400.0030.00814.51
5.6.390.0060.00814.63
5.6.380.0060.00914.41
5.6.370.0050.00514.37
5.6.360.0110.00214.43
5.6.350.0050.00914.46
5.6.340.0050.00914.44
5.6.330.0080.00614.26
5.6.320.0050.00514.48
5.6.310.0030.00814.36
5.6.300.0080.00814.40
5.6.290.0060.00814.60
5.6.280.0070.00514.55
5.6.270.0040.01114.31
5.6.260.0070.00514.37
5.6.250.0070.00614.38
5.6.240.0070.00514.49
5.6.230.0040.00414.37
5.6.220.0070.00514.42
5.6.210.0040.00814.49
5.6.200.0030.01014.48
5.6.190.0090.00614.39
5.6.180.0050.00914.32
5.6.170.0030.00814.38
5.6.160.0090.00514.40
5.6.150.0050.01014.43
5.6.140.0100.00414.50
5.6.130.0030.01014.50
5.6.120.0080.00614.37
5.6.110.0030.00814.38
5.6.100.0030.01014.50
5.6.90.0080.00314.32
5.6.80.0050.00914.33
5.6.70.0020.00914.27
5.6.60.0080.00214.24
5.6.50.0050.00714.18
5.6.40.0080.00814.40
5.6.30.0020.01114.44
5.6.20.0060.00614.21
5.6.10.0060.00714.48
5.6.00.0030.01014.34

preferences:
32.24 ms | 403 KiB | 5 Q