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.40.0120.00318.92
8.3.30.0060.00920.81
8.3.20.0040.00418.82
8.3.10.0080.00021.46
8.3.00.0080.00023.98
8.2.170.0110.00322.96
8.2.160.0100.00320.62
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00720.20
8.2.110.0030.00622.64
8.2.100.0080.00418.03
8.2.90.0050.00318.16
8.2.80.0040.00417.97
8.2.70.0080.00017.75
8.2.60.0000.00818.18
8.2.50.0000.00818.07
8.2.40.0090.00018.47
8.2.30.0040.00419.83
8.2.20.0070.00018.05
8.2.10.0030.00617.91
8.2.00.0050.00318.09
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0040.00422.44
8.1.230.0110.00021.27
8.1.220.0000.00817.91
8.1.210.0080.00019.10
8.1.200.0030.00617.36
8.1.190.0000.00817.93
8.1.180.0050.00318.10
8.1.170.0050.00318.96
8.1.160.0040.00419.14
8.1.150.0030.00619.04
8.1.140.0020.00517.72
8.1.130.0070.00018.20
8.1.120.0050.00317.70
8.1.110.0000.00717.63
8.1.100.0080.00017.59
8.1.90.0000.00717.68
8.1.80.0030.00417.77
8.1.70.0000.00717.73
8.1.60.0040.00417.88
8.1.50.0000.00717.75
8.1.40.0040.00417.85
8.1.30.0030.00517.92
8.1.20.0000.00917.84
8.1.10.0070.00017.71
8.1.00.0030.00617.65
8.0.300.0000.00720.28
8.0.290.0040.00417.40
8.0.280.0040.00418.70
8.0.270.0070.00017.53
8.0.260.0000.00717.08
8.0.250.0000.00817.26
8.0.240.0070.00317.26
8.0.230.0050.00317.16
8.0.220.0000.00717.17
8.0.210.0030.00617.17
8.0.200.0030.00317.28
8.0.190.0000.00717.25
8.0.180.0080.00317.13
8.0.170.0040.00317.16
8.0.160.0000.00717.18
8.0.150.0030.00317.16
8.0.140.0040.00417.20
8.0.130.0030.00313.55
8.0.120.0000.00817.17
8.0.110.0070.00017.29
8.0.100.0000.00817.11
8.0.90.0000.00717.01
8.0.80.0030.01317.25
8.0.70.0000.00717.11
8.0.60.0050.00316.97
8.0.50.0080.00017.30
8.0.30.0140.00917.37
8.0.20.0070.01217.40
8.0.10.0080.00017.13
8.0.00.0120.00617.06
7.4.330.0050.00215.31
7.4.320.0060.00016.88
7.4.300.0000.00716.88
7.4.290.0030.00516.93
7.4.280.0080.00016.85
7.4.270.0000.00716.87
7.4.260.0050.00013.60
7.4.250.0060.00316.75
7.4.240.0090.00016.67
7.4.230.0050.00216.90
7.4.220.0130.00616.74
7.4.210.0110.00716.80
7.4.200.0030.00316.74
7.4.190.0000.00716.85
7.4.160.0080.00816.77
7.4.150.0120.00917.40
7.4.140.0130.00617.86
7.4.130.0090.00916.56
7.4.120.0120.00516.81
7.4.110.0150.00316.89
7.4.100.0100.01316.83
7.4.90.0130.00716.72
7.4.80.0090.00919.39
7.4.70.0060.01016.50
7.4.60.0090.00916.59
7.4.50.0050.00516.52
7.4.40.0070.00822.77
7.4.30.0110.00716.86
7.4.00.0060.00915.25
7.3.330.0030.00313.41
7.3.320.0030.00313.42
7.3.310.0000.00816.52
7.3.300.0000.00616.49
7.3.290.0030.01616.51
7.3.280.0100.00916.45
7.3.270.0060.01317.40
7.3.260.0080.01218.24
7.3.250.0100.01116.76
7.3.240.0100.00716.82
7.3.230.0160.00616.58
7.3.210.0140.01116.72
7.3.200.0130.00919.39
7.3.190.0060.01016.57
7.3.180.0080.00816.37
7.3.170.0100.00616.82
7.3.160.0210.00016.68
7.3.120.0130.00314.67
7.3.110.0000.01114.79
7.3.100.0030.01314.42
7.3.90.0060.00614.78
7.3.80.0070.00414.69
7.3.70.0070.00714.92
7.3.60.0060.00914.61
7.3.50.0000.01314.80
7.3.40.0070.00714.67
7.3.30.0000.01514.82
7.3.20.0090.00616.74
7.3.10.0050.00516.54
7.3.00.0070.00316.62
7.2.330.0100.00716.93
7.2.320.0060.01216.95
7.2.310.0130.00516.99
7.2.300.0140.00316.86
7.2.290.0070.01016.86
7.2.240.0050.00814.97
7.2.230.0110.00014.59
7.2.220.0030.01015.12
7.2.210.0090.00615.39
7.2.200.0030.01014.64
7.2.190.0000.01514.97
7.2.180.0070.00714.96
7.2.170.0030.01415.11
7.2.160.0040.01114.74
7.2.150.0000.01416.68
7.2.140.0070.01116.88
7.2.130.0090.00616.95
7.2.120.0120.00316.82
7.2.110.0060.00916.69
7.2.100.0060.00916.86
7.2.90.0060.00916.86
7.2.80.0060.00917.14
7.2.70.0000.01216.71
7.2.60.0070.01117.05
7.2.50.0090.00616.68
7.2.40.0000.01317.00
7.2.30.0070.00716.70
7.2.20.0030.00916.85
7.2.10.0070.00316.92
7.2.00.0070.00618.14
7.1.330.0050.00516.02
7.1.320.0070.01015.85
7.1.310.0040.01115.78
7.1.300.0060.00615.86
7.1.290.0000.00915.80
7.1.280.0040.00415.86
7.1.270.0060.00315.91
7.1.260.0030.00915.84
7.1.250.0060.00615.94
7.1.100.0040.00818.07
7.1.70.0100.00517.24
7.1.60.0110.00419.17
7.1.50.0150.01117.05
7.1.00.0030.03322.56
7.0.200.0030.00716.80
7.0.140.0070.07022.18
7.0.100.0070.08020.21
7.0.90.0070.08020.15
7.0.80.0470.07320.11
7.0.70.0070.05320.02
7.0.60.0100.04020.14
7.0.50.0030.04320.38
7.0.40.0070.03720.28
7.0.30.0070.04020.27
7.0.20.0030.04020.06
7.0.10.0030.06020.18
7.0.00.0030.05020.28
5.6.280.0030.07321.05
5.6.250.0130.07320.88
5.6.240.0030.04320.86
5.6.230.0100.07720.84
5.6.220.0030.05320.68
5.6.210.0100.03720.86
5.6.200.0030.03721.12
5.6.190.0070.04021.09
5.6.180.0030.04721.14
5.6.170.0030.04321.05
5.6.160.0100.03721.15
5.6.150.0000.03721.25
5.6.140.0030.03721.21
5.6.130.0030.04321.25
5.6.120.0000.04021.28
5.6.110.0070.04021.03
5.6.100.0000.04021.24
5.6.90.0100.03321.21
5.6.80.0030.04020.61
5.6.70.0000.03720.44
5.6.60.0100.03320.51
5.6.50.0000.03720.50
5.6.40.0070.03020.55
5.6.30.0000.04020.54
5.6.20.0070.03020.58
5.6.10.0070.03020.56
5.6.00.0100.03720.53
5.5.380.0070.05020.59
5.5.370.0100.07720.50
5.5.360.0000.04720.63
5.5.350.0170.05720.47
5.5.340.0030.04321.04
5.5.330.0030.04320.90
5.5.320.0030.04021.03
5.5.310.0070.03721.06
5.5.300.0030.04020.93
5.5.290.0000.03721.02
5.5.280.0070.03720.75
5.5.270.0070.03321.03
5.5.260.0030.04021.05
5.5.250.0130.05720.82
5.5.240.0000.04320.29
5.5.230.0070.03020.30
5.5.220.0070.03020.39
5.5.210.0100.02720.38
5.5.200.0070.03320.35
5.5.190.0030.03320.26
5.5.180.0030.04020.39
5.5.160.0000.04720.31
5.5.150.0070.03020.37
5.5.140.0030.04020.37
5.5.130.0130.03020.34
5.5.120.0000.04020.31
5.5.110.0130.02320.38
5.5.100.0070.08020.22
5.5.90.0000.04320.20
5.5.80.0000.06020.14
5.5.70.0070.04320.27
5.5.60.0030.08020.13
5.5.50.0070.04020.22
5.5.40.0030.04720.22
5.5.30.0100.04020.21
5.5.20.0000.07020.18
5.5.10.0070.04720.20
5.5.00.0070.03720.22
5.4.450.0030.03719.60
5.4.440.0000.03719.64
5.4.430.0100.03719.50
5.4.420.0100.02719.41
5.4.410.0070.03019.49
5.4.400.0070.03719.08
5.4.390.0000.04019.32
5.4.380.0030.04019.17
5.4.370.0030.05319.21
5.4.360.0070.03319.21
5.4.350.0070.03019.16
5.4.340.0030.04019.18
5.4.320.0130.03719.18
5.4.310.0030.03719.21
5.4.300.0030.03719.16
5.4.290.0030.04019.07
5.4.280.0030.03319.16
5.4.270.0030.03719.34
5.4.260.0030.03019.19
5.4.250.0070.04719.29
5.4.240.0100.03319.16
5.4.230.0100.06719.30
5.4.220.0070.07719.28
5.4.210.0100.07319.30
5.4.200.0000.04719.16
5.4.190.0130.07319.22
5.4.180.0100.03719.25
5.4.170.0100.03319.36
5.4.160.0000.04319.16
5.4.150.0070.06719.20
5.4.140.0100.06316.54
5.4.130.0170.03016.52
5.4.120.0100.04716.62
5.4.110.0170.06016.55
5.4.100.0000.07016.59
5.4.90.0030.03716.55
5.4.80.0100.05716.56
5.4.70.0200.06016.51
5.4.60.0130.07016.71
5.4.50.0030.06316.55
5.4.40.0030.04016.53
5.4.30.0030.07316.55
5.4.20.0000.04016.54
5.4.10.0100.06316.52
5.4.00.0070.07016.03
5.3.290.0030.03714.86
5.3.280.0070.06714.75
5.3.270.0000.07714.82
5.3.260.0030.05714.66
5.3.250.0070.04314.80
5.3.240.0100.07314.76
5.3.230.0000.03714.66
5.3.220.0070.06314.77
5.3.210.0170.04714.75
5.3.200.0100.06014.75
5.3.190.0030.05714.75
5.3.180.0000.04714.76
5.3.170.0100.07014.71
5.3.160.0030.05014.67
5.3.150.0070.03014.80
5.3.140.0030.03714.75
5.3.130.0070.06714.74
5.3.120.0070.04014.73
5.3.110.0000.06014.60
5.3.100.0030.03314.10
5.3.90.0030.08014.07
5.3.80.0070.07314.20
5.3.70.0030.03714.12
5.3.60.0030.06014.18
5.3.50.0070.07014.14
5.3.40.0030.07714.18
5.3.30.0000.07314.12
5.3.20.0030.03713.90
5.3.10.0000.04313.73
5.3.00.0100.06713.79
5.2.170.0030.02712.60
5.2.160.0070.04712.60
5.2.150.0000.03012.60
5.2.140.0000.03012.60
5.2.130.0070.06012.60
5.2.120.0030.06312.60
5.2.110.0070.06312.60
5.2.100.0070.05712.60
5.2.90.0070.05012.60
5.2.80.0000.06712.60
5.2.70.0070.02312.60
5.2.60.0070.03012.60
5.2.50.0000.06012.60
5.2.40.0070.06012.60
5.2.30.0070.05712.60
5.2.20.0030.02712.60
5.2.10.0130.05012.60
5.2.00.0030.05012.60
5.1.60.0030.05312.60
5.1.50.0070.02312.60
5.1.40.0070.04312.60
5.1.30.0030.05712.60
5.1.20.0030.02712.60
5.1.10.0030.05012.60
5.1.00.0030.05312.60
5.0.50.0100.03012.60
5.0.40.0030.04312.60
5.0.30.0100.06012.60
5.0.20.0070.03012.60
5.0.10.0000.04712.60
5.0.00.0000.05312.60
4.4.90.0030.03312.60
4.4.80.0000.03312.60
4.4.70.0000.04012.60
4.4.60.0000.03012.60
4.4.50.0000.04012.60
4.4.40.0000.03012.60
4.4.30.0000.02012.60
4.4.20.0000.03712.60
4.4.10.0070.03012.60
4.4.00.0030.03712.60
4.3.110.0030.01312.60
4.3.100.0000.02012.60
4.3.90.0030.03012.60
4.3.80.0000.03012.60
4.3.70.0070.02312.60
4.3.60.0000.03712.60
4.3.50.0070.03012.60
4.3.40.0000.04712.60
4.3.30.0000.03312.60
4.3.20.0030.03012.60
4.3.10.0000.03712.60
4.3.00.0000.02712.60

preferences:
52.43 ms | 400 KiB | 5 Q