3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="something-first"> <div class="something-child something-good another something-great"> <my:text value="huhu"> </div> </div>'; libxml_use_internal_errors(true); $domDoc = new DOMDocument(); /*$domDoc->formatOutput = false; $domDoc->resolveExternals = false; $domDoc->substituteEntities = false; $domDoc->strictErrorChecking = false;*/ $domDoc->validateOnParse = false; $domDoc->loadHTML($html/*, LIBXML_NOERROR | LIBXML_NOWARNING*/); $xpath = new DOMXPath($domDoc); $xpath->registerNamespace ('my', 'http://www.example.com/' ); // -----> This results in zero nodes cause namespace gets stripped by loadHTML() $nodes = $xpath->query('//my:text'); var_dump($nodes);

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.0110.00417.13
8.3.50.0110.00516.71
8.3.40.0090.00619.08
8.3.30.0130.00319.21
8.3.20.0040.00419.02
8.3.10.0040.00420.86
8.3.00.0080.00019.75
8.2.180.0180.00418.66
8.2.170.0070.00722.96
8.2.160.0030.01420.95
8.2.150.0150.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00321.24
8.2.110.0060.00321.29
8.2.100.0000.01318.09
8.2.90.0050.00519.42
8.2.80.0040.00419.59
8.2.70.0090.00017.72
8.2.60.0030.00717.93
8.2.50.0100.00018.07
8.2.40.0070.00318.41
8.2.30.0000.01118.28
8.2.20.0060.00319.67
8.2.10.0000.00818.08
8.2.00.0040.00418.06
8.1.280.0060.01525.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0050.00522.76
8.1.230.0080.00421.29
8.1.220.0000.00818.03
8.1.210.0070.00220.93
8.1.200.0000.00917.60
8.1.190.0040.00417.91
8.1.180.0050.00318.10
8.1.170.0040.00419.13
8.1.160.0040.00419.29
8.1.150.0020.00518.83
8.1.140.0040.00417.70
8.1.130.0030.00318.15
8.1.120.0030.00617.76
8.1.110.0000.00817.72
8.1.100.0040.00417.67
8.1.90.0000.00717.75
8.1.80.0000.00717.71
8.1.70.0030.00317.59
8.1.60.0040.00417.83
8.1.50.0030.00517.60
8.1.40.0050.00317.73
8.1.30.0080.00017.82
8.1.20.0040.00417.96
8.1.10.0030.00517.79
8.1.00.0000.00817.65
8.0.300.0000.00820.09
8.0.290.0040.00416.88
8.0.280.0000.00818.75
8.0.270.0000.00817.41
8.0.260.0050.00317.18
8.0.250.0070.00017.26
8.0.240.0050.00217.09
8.0.230.0040.00417.19
8.0.220.0030.00317.18
8.0.210.0030.00317.11
8.0.200.0000.00717.22
8.0.190.0040.00417.06
8.0.180.0040.00417.16
8.0.170.0030.00617.09
8.0.160.0050.00317.32
8.0.150.0060.00317.15
8.0.140.0000.00817.01
8.0.130.0050.00013.56
8.0.120.0020.00517.15
8.0.110.0070.00017.02
8.0.100.0000.00717.25
8.0.90.0070.00017.00
8.0.80.0100.00717.11
8.0.70.0090.00017.25
8.0.60.0000.00717.09
8.0.50.0040.00417.23
8.0.30.0150.01217.26
8.0.20.0110.00717.55
8.0.10.0080.00017.13
8.0.00.0100.01317.11
7.4.330.0060.00013.34
7.4.320.0060.00016.78
7.4.300.0030.00316.79
7.4.290.0030.00316.79
7.4.280.0030.00516.77
7.4.270.0070.00316.77
7.4.260.0030.00313.45
7.4.250.0040.00416.77
7.4.240.0060.00316.80
7.4.230.0030.00316.74
7.4.220.0150.01216.76
7.4.210.0100.00516.84
7.4.200.0030.00316.95
7.4.190.0040.00416.70
7.4.160.0080.00816.67
7.4.150.0100.00716.93
7.4.140.0100.00816.74
7.4.130.0090.00916.80
7.4.120.0110.00816.78
7.4.110.0030.01316.70
7.4.100.0090.00916.78
7.4.90.0070.01016.85
7.4.80.0110.00719.39
7.4.70.0100.00716.70
7.4.60.0030.01416.58
7.4.50.0060.00616.68
7.4.40.0050.01016.56
7.4.30.0030.01416.61
7.4.00.0050.01214.91
7.3.330.0000.00613.31
7.3.320.0040.00413.29
7.3.310.0040.00416.59
7.3.300.0070.00016.51
7.3.290.0070.01116.50
7.3.280.0070.01016.58
7.3.270.0150.00316.51
7.3.260.0000.02416.61
7.3.250.0070.01016.79
7.3.240.0040.01416.69
7.3.230.0080.00816.74
7.3.210.0080.00816.81
7.3.200.0100.00616.79
7.3.190.0100.01016.37
7.3.180.0100.00616.73
7.3.170.0140.01016.58
7.3.160.0050.01116.54
7.3.120.0040.01215.01
7.3.110.0100.00714.51
7.3.100.0060.01215.00
7.3.90.0070.00714.80
7.3.80.0060.00815.03
7.3.70.0000.01414.55
7.3.60.0030.00714.98
7.3.50.0110.00014.71
7.3.40.0060.00914.83
7.3.30.0060.00314.96
7.3.20.0070.00316.96
7.3.10.0030.01216.82
7.3.00.0080.00816.80
7.2.330.0120.00617.07
7.2.320.0150.00916.70
7.2.310.0170.00616.77
7.2.300.0090.00917.07
7.2.290.0070.01016.64
7.2.250.0070.01414.92
7.2.240.0180.00415.32
7.2.230.0030.01214.88
7.2.220.0030.01315.11
7.2.210.0070.00715.08
7.2.200.0060.00615.07
7.2.190.0000.01115.14
7.2.180.0030.01014.79
7.2.170.0040.00715.07
7.2.00.0080.00619.55
7.1.330.0060.00915.63
7.1.320.0070.00715.82
7.1.310.0100.00715.72
7.1.300.0000.01415.54
7.1.290.0060.00616.05
7.1.280.0060.00615.83
7.1.270.0120.00015.94
7.1.260.0000.01715.88
7.1.100.0070.00318.34
7.1.70.0130.00317.22
7.1.60.0140.01119.40
7.1.50.0200.01634.88
7.1.00.0000.03722.62
7.0.200.0200.00315.07
7.0.140.0030.07322.26
7.0.120.0070.07022.30
7.0.60.0030.08720.02
7.0.50.0170.07017.96
7.0.40.0030.04320.23
7.0.30.0130.04320.26
7.0.20.0130.04320.44
7.0.10.0370.06020.40
7.0.00.0070.08020.38
5.6.280.0070.07021.02
5.6.210.0030.04320.91
5.6.200.0070.08718.39
5.6.190.0070.04020.77
5.6.180.0200.04020.89
5.6.170.0270.05720.71
5.6.160.0100.08020.63
5.6.150.0100.08318.25
5.6.140.0030.04018.33
5.6.130.0070.04018.38
5.6.120.0030.09021.15
5.6.110.0130.07721.12
5.6.100.0100.08321.10
5.6.90.0100.06020.99
5.6.80.0130.07320.39
5.6.70.0130.05020.50
5.5.350.0270.04020.57
5.5.340.0100.06318.29
5.5.330.0170.04320.59
5.5.320.0200.08320.41
5.5.310.0370.07320.38
5.5.300.0130.07018.16
5.5.290.0030.06018.09
5.5.280.0100.08320.90
5.5.270.0130.07320.90
5.5.260.0100.09020.97
5.5.250.0000.08720.69
5.5.240.0130.07320.36
5.4.450.0100.07719.66
5.4.440.0230.06319.52
5.4.430.0030.04319.61
5.4.420.0100.03319.63
5.4.410.0030.04319.27
5.4.400.0000.04719.26
5.4.390.0070.07019.02
5.4.380.0100.04019.07
5.4.370.0030.08019.31
5.4.360.0200.03719.33
5.4.350.0130.07719.23
5.4.340.0170.07019.13
5.4.320.0170.07019.23
5.4.310.0200.06319.02
5.4.300.0100.04019.35
5.4.290.0200.06319.02
5.4.280.0070.04019.20
5.4.270.0030.04019.02
5.4.260.0130.07319.27
5.4.250.0100.04019.02
5.4.240.0070.08018.99
5.4.230.0100.07719.38
5.4.220.0070.04719.34
5.4.210.0070.05319.23
5.4.200.0070.03719.36
5.4.190.0070.04318.98
5.4.180.0130.06719.13
5.4.170.0030.04019.30
5.4.160.0030.07319.34
5.4.150.0070.07719.41
5.4.140.0100.03016.63
5.4.130.0070.04016.54
5.4.120.0200.06016.58
5.4.110.0100.07316.56
5.4.100.0030.07016.86
5.4.90.0070.07016.64
5.4.80.0100.07016.53
5.4.70.0070.06016.64
5.4.60.0070.04316.65
5.4.50.0070.07016.64
5.4.40.0130.02716.51
5.4.30.0000.04016.54
5.4.20.0000.08016.53
5.4.10.0030.03716.63
5.4.00.0000.04016.07
5.3.290.0070.05014.78
5.3.280.0100.04314.65
5.3.270.0030.05314.64
5.3.260.0100.06014.78
5.3.250.0130.06714.76
5.3.240.0070.03314.81
5.3.230.0030.08014.75
5.3.220.0070.03714.87
5.3.210.0100.04314.63
5.3.200.0070.04014.77
5.3.190.0030.08014.75
5.3.180.0000.08014.77
5.3.170.0000.05014.63
5.3.160.0100.06714.63
5.3.150.0030.06314.73
5.3.140.0100.03314.71
5.3.130.0030.05014.77
5.3.120.0030.07714.75
5.3.110.0030.06014.61
5.3.100.0000.08314.20
5.3.90.0100.07314.23
5.3.80.0000.07314.24
5.3.70.0100.03314.22
5.3.60.0000.08314.09
5.3.50.0100.04714.12
5.3.40.0070.07714.02
5.3.30.0070.04014.12
5.3.20.0030.06713.85
5.3.10.0130.03713.71
5.3.00.0100.07013.84
5.2.170.0070.06711.17
5.2.160.0070.05311.30
5.2.150.0030.05711.19
5.2.140.0000.03311.44
5.2.130.0030.06011.14
5.2.120.0070.06011.16
5.2.110.0070.05711.27
5.2.100.0100.04011.25
5.2.90.0030.04711.29
5.2.80.0000.03011.23
5.2.70.0030.03011.26
5.2.60.0030.02711.24
5.2.50.0000.03011.22
5.2.40.0000.03011.29
5.2.30.0000.03311.19
5.2.20.0070.02310.99
5.2.10.0000.03011.07
5.2.00.0000.03310.86
5.1.60.0100.01710.17
5.1.50.0000.02710.14
5.1.40.0000.03010.02
5.1.30.0000.02710.52
5.1.20.0070.02710.54
5.1.10.0030.02310.23
5.1.00.0030.02710.21
5.0.50.0030.0178.56
5.0.40.0030.0178.55
5.0.30.0000.0308.12
5.0.20.0030.0178.18
5.0.10.0000.0238.21
5.0.00.0000.0308.21
4.4.90.0030.0138.10
4.4.80.0000.0178.10
4.4.70.0000.0178.10
4.4.60.0030.0138.10
4.4.50.0000.0178.10
4.4.40.0000.0238.10
4.4.30.0030.0178.10
4.4.20.0030.0138.10
4.4.10.0030.0138.10
4.4.00.0000.0238.10
4.3.110.0030.0178.10
4.3.100.0000.0138.10
4.3.90.0030.0108.10
4.3.80.0030.0238.10
4.3.70.0070.0108.10
4.3.60.0030.0108.10
4.3.50.0030.0108.10
4.3.40.0000.0238.10
4.3.30.0000.0138.10
4.3.20.0000.0138.10
4.3.10.0000.0138.10
4.3.00.0000.0138.10

preferences:
56.19 ms | 400 KiB | 5 Q