3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new \DOMDocument(); $root = $dom->createElementNS('http://example.com', 'root'); $dom->appendChild($root); $a1 = $dom->createElementNS('http://example.com', 'a'); $a1->appendChild($dom->createElementNS('http://example.com', 'b')); $root->appendChild($a1); $a2 = $dom->createElementNS('http://example.com', 'a'); $a2->appendChild($dom->createElementNS('http://example.com', 'b')); $root->appendChild($a2); echo $dom->saveXML();

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.0130.00724.06
8.4.110.0140.00619.25
8.4.100.0100.01219.04
8.4.90.0080.00320.86
8.4.80.0070.00418.96
8.4.70.0080.00118.87
8.4.60.0060.00319.07
8.4.50.0120.00920.63
8.4.40.0130.00717.46
8.4.30.0090.00920.72
8.4.20.0160.00322.82
8.4.10.0060.00323.89
8.3.250.0120.00918.85
8.3.240.0120.00717.32
8.3.230.0120.00716.53
8.3.220.0050.00218.98
8.3.210.0130.00616.60
8.3.200.0110.00216.87
8.3.190.0080.00717.38
8.3.180.0090.00719.10
8.3.170.0120.00619.09
8.3.160.0070.01118.88
8.3.150.0040.01516.62
8.3.140.0030.00617.23
8.3.130.0060.00316.67
8.3.120.0070.01120.41
8.3.110.0050.00320.94
8.3.100.0090.00024.06
8.3.90.0000.00826.77
8.3.80.0090.00017.97
8.3.70.0060.01616.75
8.3.60.0080.00816.63
8.3.50.0120.00616.60
8.3.40.0030.01022.18
8.3.30.0030.01020.15
8.3.20.0060.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0090.00920.89
8.2.280.0030.00518.36
8.2.270.0040.01518.74
8.2.260.0050.00316.68
8.2.250.0090.00916.94
8.2.240.0080.00019.11
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0090.00626.77
8.2.200.0030.00616.88
8.2.190.0120.00916.81
8.2.180.0170.00716.75
8.2.170.0070.00719.27
8.2.160.0070.00722.96
8.2.150.0020.00525.66
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0080.00020.01
8.2.110.0090.00021.13
8.2.100.0060.00619.47
8.2.90.0050.00319.35
8.2.80.0040.00420.75
8.2.70.0060.00317.75
8.2.60.0140.00517.63
8.2.50.0060.01117.38
8.2.40.0160.00017.38
8.2.30.0170.00317.38
8.2.20.0080.00817.50
8.2.10.0120.00417.50
8.2.00.0100.00617.13
8.1.330.0120.00722.01
8.1.320.0110.00716.44
8.1.310.0070.01118.00
8.1.300.0040.00420.36
8.1.290.0090.00030.84
8.1.280.0100.01025.92
8.1.270.0040.00422.36
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00322.22
8.1.230.0160.00021.04
8.1.220.0050.00317.89
8.1.210.0050.00319.10
8.1.200.0130.00417.25
8.1.190.0180.00016.99
8.1.180.0110.00616.99
8.1.170.0170.00017.25
8.1.160.0050.01117.35
8.1.150.0100.00717.23
8.1.140.0120.00416.87
8.1.130.0110.00517.13
8.1.120.0100.00717.50
8.1.110.0080.00817.25
8.1.100.0100.00617.38
8.1.90.0150.00017.59
8.1.80.0080.00817.25
8.1.70.0160.00017.50
8.1.60.0150.00417.38
8.1.50.0210.00017.50
8.1.40.0190.00017.50
8.1.30.0110.00717.38
8.1.20.0120.00617.50
8.1.10.0130.00417.50
8.1.00.0150.00317.50
8.0.300.0050.00220.16
8.0.290.0050.01116.75
8.0.280.0120.00416.62
8.0.270.0120.00416.86
8.0.260.0140.00316.58
8.0.250.0140.00316.58
8.0.240.0170.00016.88
8.0.230.0100.00716.75
8.0.220.0130.00316.58
8.0.210.0090.00916.75
8.0.200.0080.00816.84
8.0.190.0110.00616.75
8.0.180.0160.00016.75
8.0.170.0160.00016.72
8.0.160.0080.00816.63
8.0.150.0100.00716.63
8.0.140.0160.00016.61
8.0.130.0100.00516.63
8.0.120.0160.00016.63
8.0.110.0080.00816.58
8.0.100.0160.00016.58
8.0.90.0080.00816.63
8.0.80.0040.01316.73
8.0.70.0160.00016.75
8.0.60.0160.00016.58
8.0.50.0150.00416.63
8.0.30.0100.00816.58
8.0.20.0120.00616.63
8.0.10.0160.00016.71

preferences:
27.49 ms | 403 KiB | 5 Q