3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * What is the DOM Core Version is Supported by PHP DOM? */ $dom = new DOMDocument(); $dom->loadXML('<root/>'); $element = $dom->documentElement; function dom_list_feature(DOMDocument $dom, $feature, array $versions) { echo "$feature Feature is in PHP DOMDocument implementation:\n\n"; $found = []; foreach ($versions as $i => $version) { $result = $dom->implementation->hasFeature($feature, $version); if ($result) { $found[] = $version; } printf(" %d.) $feature %' -5s: %s\n", $i + 1, var_export($version, true), $result ? 'TRUE' : 'FALSE'); } $formatter = new NumberFormatter('en_UK', NumberFormatter::SPELLOUT); $count = ucfirst($formatter->format($found)); printf("\n%s %s versions found%s.\n\n", $count, $feature, $found ? ': ' . implode('; ', $found) : ''); } # Test DOMDocument in PHP Support for DOM-Core Feature # Document Object Model (DOM) <http://www.w3.org/DOM/DOMTR> dom_list_feature($dom, "Core", ['3.0', '2.0', '1.0', '', NULL]); # Test DOMDocument in PHP Support for DOM-XPath Feature # Document Object Model XPath <http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html> dom_list_feature($dom, "XPath", ['3.0', '2.0', '1.0', '', NULL]);

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.0060.00919.63
8.3.50.0220.00523.38
8.3.40.0130.00321.02
8.3.30.0110.00421.13
8.3.20.0060.00322.39
8.3.10.0060.00325.61
8.3.00.0000.00822.96
8.2.180.0180.00619.63
8.2.170.0060.00922.96
8.2.160.0100.00624.25
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0030.00626.16
8.2.120.0040.00424.22
8.2.110.0000.01223.57
8.2.100.0120.00020.34
8.2.90.0000.00821.17
8.2.80.0060.00620.29
8.2.70.0000.00920.13
8.2.60.0070.00320.38
8.2.50.0080.00020.25
8.2.40.0060.00321.71
8.2.30.0080.00420.47
8.2.20.0050.00520.35
8.2.10.0080.00020.35
8.2.00.0090.01020.21
8.1.280.0040.01525.92
8.1.270.0060.00325.92
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0100.00023.87
8.1.230.0080.00421.66
8.1.220.0040.00420.03
8.1.210.0030.00619.85
8.1.200.0050.01019.73
8.1.190.0080.00020.03
8.1.180.0000.01019.85
8.1.170.0000.00921.12
8.1.160.0040.00423.95
8.1.150.0040.00820.58
8.1.140.0040.00819.99
8.1.130.0100.00320.27
8.1.120.0110.00019.94
8.1.110.0090.00420.14
8.1.100.0030.00820.06
8.1.90.0030.00820.13
8.1.80.0040.00420.05
8.1.70.0030.00620.11
8.1.60.0130.00320.11
8.1.50.0090.00320.27
8.1.40.0060.00620.18
8.1.30.0030.00620.23
8.1.20.0050.00320.30
8.1.10.0110.00020.24
8.1.00.0040.00420.01
8.0.300.0040.00419.72
8.0.290.0030.00619.66
8.0.280.0040.00420.33
8.0.270.0090.00319.69
8.0.260.0070.00719.27
8.0.250.0000.00919.42
8.0.240.0070.00719.59
8.0.230.0070.00319.28
8.0.220.0060.00619.40
8.0.210.0030.00619.56
8.0.200.0070.00419.57
8.0.190.0050.00819.39
8.0.180.0040.00819.34
8.0.170.0040.00419.36
8.0.160.0000.01019.23
8.0.150.0110.00019.20
8.0.140.0070.00319.29
8.0.130.0030.00313.63
8.0.120.0000.00919.26
8.0.110.0030.00619.55
8.0.100.0080.00019.65
8.0.90.0050.00519.50
8.0.80.0110.01519.35
8.0.70.0050.00319.70
8.0.60.0000.00919.61
8.0.50.0040.00419.48
8.0.30.0090.01319.76
8.0.20.0100.01219.46
8.0.10.0090.00019.52
8.0.00.0100.01219.38
7.4.330.0060.00015.24
7.4.320.0000.00819.23
7.4.300.0090.00019.35
7.4.290.0000.01119.05
7.4.280.0070.00419.36
7.4.270.0050.00519.34
7.4.260.0090.00319.37
7.4.250.0040.00419.32
7.4.240.0080.00019.21
7.4.230.0040.00419.39
7.4.220.0130.01019.27
7.4.210.0070.01219.27
7.4.200.0060.00319.05
7.4.190.0030.00619.23
7.4.160.0130.01019.14
7.4.150.0090.01519.10
7.4.140.0070.01519.04
7.4.130.0060.01419.04
7.4.120.0030.01519.11
7.4.110.0170.01118.99
7.4.100.0180.01119.00
7.4.90.0150.01619.15
7.4.80.0090.00919.11
7.4.70.0090.00919.14
7.4.60.0120.01119.25
7.4.50.0080.00518.93
7.4.40.0030.01022.77
7.4.30.0140.01418.99
7.4.00.0110.00417.98
7.3.330.0050.00013.66
7.3.320.0000.00513.67
7.3.310.0060.00319.15
7.3.300.0040.00419.14
7.3.290.0060.01019.05
7.3.280.0140.00819.00
7.3.270.0000.02019.05
7.3.260.0130.01019.12
7.3.250.0130.00919.16
7.3.240.0100.01319.38
7.3.230.0050.01619.26
7.3.210.0130.01019.10
7.3.200.0180.00719.39
7.3.190.0130.01019.05
7.3.180.0110.01419.27
7.3.170.0110.01419.32
7.3.160.0090.01519.20
7.3.120.0030.01517.63
7.3.10.0120.00818.70
7.3.00.0090.01218.75
7.2.330.0180.01218.76
7.2.320.0070.01919.10
7.2.310.0150.00919.45
7.2.300.0090.01819.23
7.2.290.0130.00618.96
7.2.130.0160.00819.15
7.2.120.0020.01419.33
7.2.110.0040.00919.29
7.2.100.0090.00919.12
7.2.90.0070.01219.32
7.2.80.0160.00419.24
7.2.70.0070.01319.19
7.2.60.0100.00719.36
7.2.50.0060.01319.16
7.2.40.0080.00819.04
7.2.30.0080.00719.28
7.2.20.0090.00819.25
7.2.10.0040.01119.29
7.2.00.0050.00820.33
7.1.250.0090.01318.31
7.1.100.0080.01220.61
7.1.70.0040.00919.86
7.1.60.0100.00520.15
7.1.50.0160.00819.77
7.1.00.0030.07725.14
7.0.200.0080.01519.43
7.0.140.0070.06324.88
7.0.100.0070.08722.53
7.0.90.0030.07722.49
7.0.80.0170.04722.54
7.0.70.0100.08022.54
7.0.60.0130.08022.42
7.0.50.0100.08022.85
7.0.40.0170.07722.63
7.0.30.0030.05022.71
7.0.20.0070.07322.48
7.0.10.0030.08022.71
7.0.00.0200.06722.62
5.6.280.0000.08023.80
5.6.250.0030.08323.13
5.6.240.0170.06323.34
5.6.230.0030.07323.33
5.6.220.0070.08323.12
5.6.210.0100.04723.13
5.6.200.0100.09023.57
5.6.190.0130.07723.53
5.6.180.0170.07023.68
5.6.170.0100.08323.54
5.6.160.0070.08323.68
5.6.150.0100.07323.70
5.6.140.0170.05323.59
5.6.130.0030.08323.58
5.6.120.0170.07723.63
5.6.110.0070.08723.70
5.6.100.0100.08023.44
5.6.90.0100.07723.39
5.6.80.0170.06722.95
5.6.70.0070.08022.95
5.6.60.0100.07723.05
5.6.50.0100.07322.95
5.6.40.0130.07722.98
5.6.30.0130.06023.14
5.6.20.0070.08022.94
5.6.10.0100.07723.02
5.6.00.0170.04323.21
5.5.380.0070.08722.96
5.5.370.0130.07723.11
5.5.360.0070.07323.04
5.5.350.0030.08723.18
5.5.340.0100.08323.34
5.5.330.0070.08323.26
5.5.320.0000.09023.52
5.5.310.0070.08323.34
5.5.300.0070.08023.53
5.5.290.0070.09023.34
5.5.280.0070.06323.55
5.5.270.0100.07723.40
5.5.260.0070.04323.32
5.5.250.0030.06323.16
5.5.240.0130.08022.80
5.5.230.0070.08323.09
5.5.220.0130.07322.61
5.5.210.0200.06722.64
5.5.200.0030.09322.89
5.5.190.0070.05722.57
5.5.180.0000.07022.89
5.5.160.0100.04722.55
5.5.150.0100.07722.63
5.5.140.0130.07322.57
5.5.130.0070.08322.71
5.5.120.0230.05022.86
5.5.110.0200.07022.86
5.5.100.0100.05322.47
5.5.90.0070.08322.87
5.5.80.0130.07722.73
5.5.70.0100.07322.66
5.5.60.0030.08322.82
5.5.50.0100.07022.80
5.5.40.0000.06022.42
5.5.30.0100.07022.61
5.5.20.0200.06722.59
5.5.10.0130.08022.84
5.5.00.0030.07722.61
5.4.450.0100.08321.65
5.4.440.0130.08021.70
5.4.430.0100.05322.02
5.4.420.0130.06721.77
5.4.410.0100.07721.89
5.4.400.0100.07321.71
5.4.390.0070.06021.42
5.4.380.0000.07321.56
5.4.370.0030.05021.45
5.4.360.0200.06321.18
5.4.350.0030.08021.43
5.4.340.0200.07021.56
5.4.320.0100.07021.40
5.4.310.0130.06321.43
5.4.300.0070.08321.69
5.4.290.0030.07721.27
5.4.280.0170.07721.39
5.4.270.0130.07021.59
5.4.260.0070.08021.70
5.4.250.0100.03721.42
5.4.240.0030.06321.44
5.4.230.0130.07321.48
5.4.220.0070.07321.43
5.4.210.0030.07321.43
5.4.200.0100.07321.17
5.4.190.0070.05021.41
5.4.180.0100.04321.54
5.4.170.0030.05321.50
5.4.160.0030.07721.39
5.4.150.0070.07321.43
5.4.140.0170.04018.89
5.4.130.0170.05718.86
5.4.120.0030.04718.91
5.4.110.0070.07018.86
5.4.100.0070.07318.75
5.4.90.0130.06318.87
5.4.80.0070.07018.71
5.4.70.0030.07018.84
5.4.60.0100.06318.96
5.4.50.0030.07718.77
5.4.40.0130.06318.90
5.4.30.0100.07018.72
5.4.20.0030.06318.77
5.4.10.0170.06718.82
5.4.00.0100.05318.09
5.3.290.0070.07014.77
5.3.280.0000.05714.66
5.3.270.0100.04314.63
5.3.260.0000.08014.61
5.3.250.0130.07014.66
5.3.240.0000.07714.61
5.3.230.0070.07014.73
5.3.220.0070.07714.63
5.3.210.0000.08714.50
5.3.200.0070.07314.70
5.3.190.0030.07714.70
5.3.180.0030.08014.58
5.3.170.0030.07314.49
5.3.160.0070.07714.51
5.3.150.0030.07714.70
5.3.140.0070.07014.44
5.3.130.0070.07314.61
5.3.120.0030.08314.54
5.3.110.0070.06714.62
5.3.100.0030.08714.03
5.3.90.0030.06314.00
5.3.80.0070.07713.96
5.3.70.0030.08313.96
5.3.60.0170.07014.03
5.3.50.0070.07314.09
5.3.40.0130.06713.86
5.3.30.0170.06313.92
5.3.20.0100.06313.57
5.3.10.0070.07013.77
5.3.00.0130.05313.68
5.2.170.0030.06711.01
5.2.160.0030.05311.00
5.2.150.0030.03711.07
5.2.140.0000.04011.00
5.2.130.0070.06011.12
5.2.120.0200.05011.09
5.2.110.0070.05711.12
5.2.100.0070.06011.01
5.2.90.0000.06711.16
5.2.80.0030.06311.10
5.2.70.0070.06311.08
5.2.60.0030.05311.07
5.2.50.0030.06311.03
5.2.40.0100.05311.14
5.2.30.0100.06010.96
5.2.20.0100.06010.95
5.2.10.0070.05310.99
5.2.00.0030.06310.86
5.1.60.0070.04710.00
5.1.50.0030.05310.11
5.1.40.0100.03710.05
5.1.30.0100.02710.39
5.1.20.0170.04710.27
5.1.10.0000.03310.19
5.1.00.0030.05310.08
5.0.50.0070.0408.62
5.0.40.0070.0308.30
5.0.30.0000.0638.07
5.0.20.0070.0438.31
5.0.10.0000.0438.17
5.0.00.0000.0608.22
4.4.90.0000.0407.89
4.4.80.0100.0277.89
4.4.70.0000.0377.89
4.4.60.0030.0337.89
4.4.50.0000.0337.89
4.4.40.0000.0507.89
4.4.30.0030.0307.89
4.4.20.0030.0307.89
4.4.10.0030.0337.89
4.4.00.0030.0377.89
4.3.110.0000.0237.89
4.3.100.0030.0177.89
4.3.90.0000.0377.89
4.3.80.0000.0537.89
4.3.70.0000.0377.89
4.3.60.0070.0307.89
4.3.50.0000.0337.89
4.3.40.0030.0537.89
4.3.30.0000.0377.89
4.3.20.0000.0337.89
4.3.10.0000.0377.89
4.3.00.0000.0277.89

preferences:
41.98 ms | 401 KiB | 5 Q