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('//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.0040.01518.65
8.3.50.0080.01221.33
8.3.40.0060.00918.93
8.3.30.0110.00420.50
8.3.20.0050.00319.10
8.3.10.0080.00021.40
8.3.00.0040.00424.03
8.2.180.0060.00916.88
8.2.170.0090.00622.96
8.2.160.0060.00920.88
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0110.00026.16
8.2.120.0040.00420.33
8.2.110.0030.00619.57
8.2.100.0060.00617.97
8.2.90.0000.00719.46
8.2.80.0090.00019.59
8.2.70.0070.00317.75
8.2.60.0030.00618.15
8.2.50.0060.00318.07
8.2.40.0030.00620.07
8.2.30.0050.00519.79
8.2.20.0060.00317.93
8.2.10.0040.00418.20
8.2.00.0030.00718.05
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.86
8.1.230.0080.00421.47
8.1.220.0050.00318.77
8.1.210.0060.00319.45
8.1.200.0030.00617.85
8.1.190.0030.00617.89
8.1.180.0080.00318.10
8.1.170.0080.00018.96
8.1.160.0070.00019.27
8.1.150.0040.00419.03
8.1.140.0070.00017.84
8.1.130.0000.00718.14
8.1.120.0000.00717.65
8.1.110.0070.00017.85
8.1.100.0000.00817.84
8.1.90.0000.00717.78
8.1.80.0050.00217.67
8.1.70.0000.00817.82
8.1.60.0060.00317.95
8.1.50.0000.00817.81
8.1.40.0040.00417.92
8.1.30.0040.00418.00
8.1.20.0000.00818.02
8.1.10.0060.00317.95
8.1.00.0040.00417.77
8.0.300.0000.00920.39
8.0.290.0040.00417.29
8.0.280.0030.00318.76
8.0.270.0030.00317.60
8.0.260.0080.00017.22
8.0.250.0040.00417.32
8.0.240.0030.00517.28
8.0.230.0030.00317.35
8.0.220.0070.00017.12
8.0.210.0040.00417.07
8.0.200.0080.00017.21
8.0.190.0000.00717.20
8.0.180.0110.00017.21
8.0.170.0040.00417.22
8.0.160.0040.00417.11
8.0.150.0070.00017.14
8.0.140.0040.00417.24
8.0.130.0030.00313.77
8.0.120.0040.00417.24
8.0.110.0070.00017.23
8.0.100.0040.00317.09
8.0.90.0000.00717.02
8.0.80.0060.00917.18
8.0.70.0050.00317.19
8.0.60.0050.00317.18
8.0.50.0000.00817.07
8.0.30.0030.01617.43
8.0.20.0150.00617.41
8.0.10.0050.00217.31
8.0.00.0090.01017.07
7.4.330.0050.00017.13
7.4.320.0060.00316.80
7.4.300.0030.00316.93
7.4.290.0050.00216.94
7.4.280.0030.00316.79
7.4.270.0030.00316.92
7.4.260.0000.00513.53
7.4.250.0080.00016.94
7.4.240.0030.00417.02
7.4.230.0040.00416.94
7.4.220.0130.01016.87
7.4.210.0080.01016.95
7.4.200.0030.00317.06
7.4.190.0000.00717.00
7.4.160.0070.01016.94
7.4.150.0150.00317.40
7.4.140.0080.01017.86
7.4.130.0130.00616.80
7.4.120.0090.00816.84
7.4.110.0060.01516.85
7.4.100.0160.00016.66
7.4.90.0030.01516.85
7.4.80.0140.00519.39
7.4.70.0070.01116.74
7.4.60.0140.00416.88
7.4.50.0080.00016.59
7.4.40.0040.00822.77
7.4.30.0110.00516.72
7.4.00.0070.01014.94
7.3.330.0000.00513.33
7.3.320.0040.00313.40
7.3.310.0000.00716.54
7.3.300.0030.00316.46
7.3.290.0030.01016.55
7.3.280.0100.00716.60
7.3.270.0070.01017.40
7.3.260.0130.00718.24
7.3.250.0110.00616.79
7.3.240.0090.00916.63
7.3.230.0100.00616.93
7.3.210.0110.00716.85
7.3.200.0090.01219.39
7.3.190.0030.02016.81
7.3.180.0090.00716.83
7.3.170.0060.01216.98
7.3.160.0100.00716.76
7.3.120.0040.01414.91
7.3.110.0110.00614.73
7.3.100.0000.01515.07
7.3.90.0070.00714.97
7.3.80.0070.00414.57
7.3.70.0090.00614.68
7.3.60.0060.00615.14
7.3.50.0100.00314.96
7.3.40.0030.00615.02
7.3.30.0060.01014.68
7.3.20.0090.00616.82
7.3.10.0050.00716.53
7.3.00.0040.00916.65
7.2.330.0100.01316.65
7.2.320.0100.01017.01
7.2.310.0080.01216.83
7.2.300.0130.00316.96
7.2.290.0060.01216.77
7.2.250.0090.00915.11
7.2.240.0060.00915.07
7.2.230.0070.00715.20
7.2.220.0070.01014.93
7.2.210.0120.00615.09
7.2.200.0070.00315.02
7.2.190.0090.00015.18
7.2.180.0030.01015.26
7.2.170.0000.01915.31
7.2.130.0000.01416.89
7.2.120.0060.00916.69
7.2.110.0070.00716.93
7.2.100.0060.00316.93
7.2.90.0120.00417.07
7.2.80.0070.00616.80
7.2.70.0040.00816.78
7.2.60.0080.00417.18
7.2.50.0100.00716.95
7.2.40.0030.00617.12
7.2.30.0060.00917.10
7.2.20.0030.01016.97
7.2.10.0070.00717.10
7.2.00.0040.00717.93
7.1.330.0000.01615.77
7.1.320.0090.00316.01
7.1.310.0140.00016.07
7.1.300.0040.00415.95
7.1.290.0090.00615.75
7.1.280.0060.00715.96
7.1.270.0060.00915.90
7.1.260.0000.01115.97
7.1.250.0000.01015.71
7.1.200.0030.00915.77
7.1.100.0030.01418.39
7.1.70.0110.00017.19
7.1.60.0090.01619.17
7.1.50.0060.01617.09
7.1.00.0070.03022.54
7.0.200.0000.00716.64
7.0.140.0030.07322.20
7.0.80.0200.08720.06
7.0.70.0570.05320.06
7.0.60.0630.07020.16
7.0.50.0800.05020.47
7.0.40.0030.08720.24
7.0.30.0130.07720.23
7.0.20.0100.08320.18
7.0.10.0170.07320.17
7.0.00.0170.07720.26
5.6.280.0000.07721.02
5.6.230.0130.04020.73
5.6.220.0070.03720.78
5.6.210.0070.05020.68
5.6.200.0100.05321.21
5.6.190.0170.07021.19
5.6.180.0100.07721.21
5.6.170.0000.05721.06
5.6.160.0030.05021.21
5.6.150.0030.05721.25
5.6.140.0130.04721.11
5.6.130.0100.05321.11
5.6.120.0030.04321.11
5.6.110.0100.03721.11
5.6.100.0130.07321.14
5.6.90.0100.04721.23
5.6.80.0030.07720.59
5.6.70.0030.08320.49
5.6.60.0070.07720.51
5.6.50.0070.08020.52
5.6.40.0130.07020.47
5.6.30.0070.08020.55
5.6.20.0130.07320.49
5.6.10.0130.04020.54
5.6.00.0070.08020.50
5.5.370.0030.05020.61
5.5.360.0070.06320.57
5.5.350.0170.05020.59
5.5.340.0130.07721.00
5.5.330.0100.07721.03
5.5.320.0200.07321.01
5.5.310.0130.07321.03
5.5.300.0030.04720.93
5.5.290.0130.08020.90
5.5.280.0030.04321.00
5.5.270.0030.09020.90
5.5.260.0030.06321.03
5.5.250.0100.06020.81
5.5.240.0100.03720.26
5.5.230.0070.08320.41
5.5.220.0100.07720.30
5.5.210.0130.06020.32
5.5.200.0100.04720.37
5.5.190.0070.04720.36
5.5.180.0100.07320.39
5.5.160.0230.05020.41
5.5.150.0100.06320.34
5.5.140.0170.07020.36
5.5.130.0200.06720.36
5.5.120.0030.07720.26
5.5.110.0130.06720.25
5.5.100.0100.07720.26
5.5.90.0070.04720.26
5.5.80.0030.07320.15
5.5.70.0100.07320.16
5.5.60.0070.08320.19
5.5.50.0070.04320.23
5.5.40.0070.07320.21
5.5.30.0000.07320.26
5.5.20.0070.04020.25
5.5.10.0030.07720.22
5.5.00.0100.07320.22
5.4.450.0100.07019.51
5.4.440.0000.08719.64
5.4.430.0130.07719.64
5.4.420.0070.08319.43
5.4.410.0000.08019.27
5.4.400.0000.04319.34
5.4.390.0200.06719.08
5.4.380.0070.05319.28
5.4.370.0030.08319.18
5.4.360.0100.07019.34
5.4.350.0130.07319.18
5.4.340.0100.05319.32
5.4.320.0030.04319.21
5.4.310.0030.04319.08
5.4.300.0200.06319.18
5.4.290.0100.04719.34
5.4.280.0030.07019.17
5.4.270.0130.03719.34
5.4.260.0100.03319.16
5.4.250.0070.04319.15
5.4.240.0200.06319.06
5.4.230.0100.07319.34
5.4.220.0000.04719.32
5.4.210.0070.05019.29
5.4.200.0200.06319.15
5.4.190.0100.07019.15
5.4.180.0030.07319.36
5.4.170.0000.08319.35
5.4.160.0070.04319.14
5.4.150.0030.06719.28
5.4.140.0130.06016.59
5.4.130.0030.07716.61
5.4.120.0030.06716.61
5.4.110.0030.04316.59
5.4.100.0130.07016.58
5.4.90.0070.07016.75
5.4.80.0130.03016.56
5.4.70.0000.06716.60
5.4.60.0070.06016.52
5.4.50.0030.06316.63
5.4.40.0070.05016.63
5.4.30.0130.06716.58
5.4.20.0030.04716.52
5.4.10.0070.03716.63
5.4.00.0030.06716.09
5.3.290.0170.04714.86
5.3.280.0030.07014.70
5.3.270.0000.06014.79
5.3.260.0070.06714.79
5.3.250.0000.04714.83
5.3.240.0030.07714.82
5.3.230.0100.06714.80
5.3.220.0070.06314.77
5.3.210.0000.04714.79
5.3.200.0030.07714.73
5.3.190.0070.08014.73
5.3.180.0070.05014.76
5.3.170.0170.06014.76
5.3.160.0100.05014.75
5.3.150.0070.08014.78
5.3.140.0030.08014.72
5.3.130.0000.05014.71
5.3.120.0130.06014.66
5.3.110.0000.04314.75
5.3.100.0030.08014.28
5.3.90.0070.07714.13
5.3.80.0100.05014.07
5.3.70.0000.08014.21
5.3.60.0030.08014.06
5.3.50.0070.08014.00
5.3.40.0070.06314.04
5.3.30.0100.06714.07
5.3.20.0070.06313.88
5.3.10.0000.04713.76
5.3.00.0230.02713.82
5.2.170.0030.04011.67
5.2.160.0130.05711.67
5.2.150.0070.03011.67
5.2.140.0100.03011.67
5.2.130.0100.04011.67
5.2.120.0070.03311.67
5.2.110.0130.05311.67
5.2.100.0070.06011.67
5.2.90.0130.05711.67
5.2.80.0100.05711.67
5.2.70.0100.04311.67
5.2.60.0070.05711.67
5.2.50.0000.06311.67
5.2.40.0030.06311.67
5.2.30.0000.06311.67
5.2.20.0030.06011.67
5.2.10.0070.06011.67
5.2.00.0070.04311.67
5.1.60.0070.03011.67
5.1.50.0000.05711.67
5.1.40.0030.04311.67
5.1.30.0070.04711.67
5.1.20.0070.03711.67
5.1.10.0070.05711.67
5.1.00.0030.05311.67
5.0.50.0070.04311.67
5.0.40.0000.04711.67
5.0.30.0030.06011.67
5.0.20.0030.03711.67
5.0.10.0000.05011.67
5.0.00.0030.05011.67
4.4.90.0000.03711.67
4.4.80.0070.03311.67
4.4.70.0030.02011.67
4.4.60.0030.01711.67
4.4.50.0030.03011.67
4.4.40.0070.02711.67
4.4.30.0000.02011.67
4.4.20.0070.02711.67
4.4.10.0070.03011.67
4.4.00.0000.05011.67
4.3.110.0030.02311.67
4.3.100.0030.03311.67
4.3.90.0100.02711.67
4.3.80.0000.05311.67
4.3.70.0000.03711.67
4.3.60.0000.02011.67
4.3.50.0000.02011.67
4.3.40.0030.05011.67
4.3.30.0000.03711.67
4.3.20.0000.03711.67
4.3.10.0000.03711.67
4.3.00.0000.03311.67

preferences:
43.45 ms | 401 KiB | 5 Q