3v4l.org

run code in 300+ PHP versions simultaneously
<?php $document = new DOMDocument(); $document->appendChild($document->createElement('foo')); // add attribute in namespace $document->documentElement->setAttributeNS('urn:foo', 'f:foo', 'bar'); echo $document->saveXML(); // fetch the namespace definition node $namespace = $document->documentElement->getAttributeNodeNS('http://www.w3.org/2000/xmlns/', 'f'); var_dump($namespace); // it should be an attribute node but isn't $document->documentElement->removeAttributeNode($namespace);

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.4.120.0090.00924.57
8.4.110.0050.00420.59
8.4.100.0080.00717.90
8.4.90.0110.01020.82
8.4.80.0100.01018.96
8.4.70.0100.00820.88
8.4.60.0100.01120.66
8.4.50.0130.00819.04
8.4.40.0110.00418.78
8.4.30.0040.01522.63
8.4.20.0160.00318.91
8.4.10.0030.00619.62
8.3.250.0100.00917.28
8.3.240.0100.00817.39
8.3.230.0130.00616.61
8.3.220.0060.00219.14
8.3.210.0100.00518.62
8.3.200.0050.00416.97
8.3.190.0050.00319.17
8.3.180.0080.00818.90
8.3.170.0180.00017.23
8.3.160.0110.00717.08
8.3.150.0090.00916.66
8.3.140.0070.01117.03
8.3.130.0000.00816.71
8.3.120.0060.01019.16
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0030.00626.77
8.3.80.0090.00016.75
8.3.70.0040.01117.00
8.3.60.0100.00618.55
8.3.50.0120.00318.78
8.3.40.0090.00619.10
8.3.30.0120.00318.96
8.3.20.0040.00421.20
8.3.10.0080.00023.83
8.3.00.0080.00022.61
8.2.290.0070.00322.38
8.2.280.0100.00920.60
8.2.270.0040.00416.96
8.2.260.0070.00717.11
8.2.250.0060.00316.81
8.2.240.0040.00717.61
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0000.01826.77
8.2.200.0060.00317.00
8.2.190.0080.00816.75
8.2.180.0120.00325.92
8.2.170.0090.00619.04
8.2.160.0060.00922.18
8.2.150.0050.00324.18
8.2.140.0100.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00320.20
8.2.110.0030.00622.36
8.2.100.0110.00017.91
8.2.90.0000.00817.88
8.2.80.0000.00918.18
8.2.70.0020.00818.18
8.2.60.0000.00918.34
8.2.50.0000.00818.10
8.2.40.0030.00621.14
8.2.30.0050.00319.43
8.2.20.0000.00818.16
8.2.10.0040.00419.28
8.2.00.0070.00018.24
8.1.330.0110.00722.06
8.1.320.0100.00918.25
8.1.310.0070.01116.76
8.1.300.0060.00316.57
8.1.290.0030.00618.88
8.1.280.0090.01225.92
8.1.270.0060.00324.04
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00324.09
8.1.230.0070.00321.19
8.1.220.0080.00017.89
8.1.210.0060.00318.77
8.1.200.0060.00317.60
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0080.00018.76
8.1.160.0050.00219.02
8.1.150.0040.00418.92
8.1.140.0040.00420.38
8.1.130.0070.00017.56
8.1.120.0060.00317.57
8.1.110.0030.00617.49
8.1.100.0040.00417.65
8.1.90.0000.00717.61
8.1.80.0040.00417.49
8.1.70.0000.00717.51
8.1.60.0090.00017.55
8.1.50.0040.00417.73
8.1.40.0040.00417.75
8.1.30.0040.00417.88
8.1.20.0090.00017.81
8.1.10.0030.00617.80
8.1.00.0070.00017.69
8.0.300.0000.00820.34
8.0.290.0040.00716.88
8.0.280.0050.00318.68
8.0.270.0030.00716.98
8.0.260.0040.00416.98
8.0.250.0070.00317.17
8.0.240.0040.00417.21
8.0.230.0000.00717.09
8.0.220.0050.00317.13
8.0.210.0030.00617.00
8.0.200.0000.00717.14
8.0.190.0000.00717.16
8.0.180.0090.00017.11
8.0.170.0060.00317.10
8.0.160.0000.00717.03
8.0.150.0040.00417.05
8.0.140.0040.00417.06
8.0.130.0030.00313.53
8.0.120.0060.00317.15
8.0.110.0000.00716.99
8.0.100.0040.00417.20
8.0.90.0040.00417.00
8.0.80.0060.01017.13
8.0.70.0070.00016.94
8.0.60.0000.00717.11
8.0.50.0040.00417.11
8.0.30.0120.00717.13
8.0.20.0140.00817.22
8.0.10.0040.00416.92
8.0.00.0130.00816.93
7.4.330.0060.00015.55
7.4.320.0030.00316.60
7.4.300.0030.00316.74
7.4.290.0070.00016.75
7.4.280.0000.00816.79
7.4.270.0070.00016.84
7.4.260.0070.00016.76
7.4.250.0030.00316.61
7.4.240.0040.00416.66
7.4.230.0000.00716.87
7.4.220.0080.00016.83
7.4.210.0090.00916.71
7.4.200.0030.00316.71
7.4.160.0080.00916.81
7.4.140.0100.00617.86
7.4.130.0250.00016.75
7.4.120.0150.00816.75
7.4.110.0040.01516.66
7.4.100.0150.00916.65
7.4.90.0090.00916.57
7.4.80.0070.01719.39
7.4.70.0100.01216.79
7.4.60.0090.00616.81
7.4.50.0040.01216.82
7.4.40.0090.00916.45
7.4.00.0030.01315.16
7.3.330.0040.00413.36
7.3.320.0000.00613.37
7.3.310.0070.00016.54
7.3.300.0000.00716.50
7.3.290.0000.00716.46
7.3.280.0070.00916.46
7.3.260.0120.00716.55
7.3.240.0120.00816.53
7.3.230.0120.00416.78
7.3.210.0100.00716.63
7.3.200.0090.00916.72
7.3.190.0060.01116.62
7.3.180.0130.00516.67
7.3.170.0060.01216.78
7.3.160.0040.01516.46
7.3.30.0130.00614.50
7.3.20.0630.00614.99
7.3.10.0490.00314.75
7.3.00.0730.00714.89
7.2.330.0120.00616.61
7.2.320.0070.01516.59
7.2.310.0130.00316.95
7.2.300.0110.01116.61
7.2.290.0030.01417.04
7.2.160.0060.00615.13
7.2.150.0440.00815.04
7.2.140.0680.00315.13
7.2.130.0650.00314.94
7.2.120.0710.00615.25
7.2.110.0580.00014.89
7.2.100.0500.00714.86
7.2.90.0540.00315.18
7.2.80.0560.00015.15
7.2.70.0680.00315.16
7.2.60.0710.00715.39
7.2.50.0730.01315.35
7.2.40.0680.01015.34
7.2.30.0800.00315.22
7.2.20.0660.00715.30
7.2.10.0580.00015.34
7.2.00.0640.01114.99
7.1.270.0440.01013.88
7.1.260.0680.00313.98
7.1.250.0570.00314.06

preferences:
133.75 ms | 403 KiB | 5 Q