3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmldoc = new DOMDocument(); $firstname = "myfirstname"; $lastname = "mylastname"; $email = "myemail"; $password = "mypassword"; $data = <<<DATA <?xml version="1.0"?> <Customers> <customer> <custID> 1001 </custID> <fname> Lama </fname> <lname> Lai </lname> <email> test@hotmail.com </email> <password> qwer </password> </customer> </Customers> DATA; $xmldoc->loadXML($data); $customer = $xmldoc->getElementsByTagName("customer"); $customerNew = $xmldoc->createElement("customer"); $customerNewFN = $xmldoc->createElement("fname"); $customerNewFNNode = $xmldoc->createTextNode($firstname); $customerNewFNNode = $customerNewFN->appendChild($customerNewFNNode); $customerNewFN = $customerNew->appendChild($customerNewFN); $customerNewLN = $xmldoc->createElement("lname"); $customerNewLNNode = $xmldoc->createTextNode($lastname); $customerNewLNNode = $customerNewLN->appendChild($customerNewLNNode); $customerNewLN = $customerNew->appendChild($customerNewLN); $customerNewEmail = $xmldoc->createElement("email"); $customerNewEmailNode = $xmldoc->createTextNode($email); $customerNewEmailNode = $customerNewEmail->appendChild($customerNewEmailNode); $customerNewEmail = $customerNew->appendChild($customerNewEmail); $customerNewPass = $xmldoc->createElement("password"); $customerNewPassNode = $xmldoc->createTextNode($password); $customerNewPassNode = $customerNewPass->appendChild($customerNewPassNode); $customerNewPass = $customerNew->appendChild($customerNewPass); $customer->item(0)->parentNode->insertBefore($customerNew); echo $xmldoc->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.5.10.0140.00716.91
8.5.00.0150.00620.24
8.4.160.0150.00622.73
8.4.150.0020.00114.05
8.4.140.0120.00917.72
8.4.130.0140.00717.85
8.4.120.0130.00724.30
8.4.110.0140.00618.33
8.4.100.0130.00719.13
8.4.90.0060.00519.09
8.4.80.0060.00518.87
8.4.70.0090.01018.25
8.4.60.0100.01018.91
8.4.50.0120.01119.01
8.4.40.0000.01117.85
8.4.30.0100.01017.95
8.4.20.0060.00919.81
8.4.10.0050.00320.87
8.3.280.0140.00918.73
8.3.270.0120.00916.82
8.3.260.0110.01016.96
8.3.250.0130.00719.37
8.3.240.0050.00317.43
8.3.230.0120.00717.08
8.3.220.0080.01219.38
8.3.210.0070.00916.98
8.3.200.0060.00316.95
8.3.190.0120.00617.58
8.3.180.0100.00917.46
8.3.170.0190.00020.85
8.3.160.0150.00316.81
8.3.150.0160.00317.37
8.3.140.0000.00816.93
8.3.130.0100.01018.63
8.3.120.0040.00420.91
8.3.110.0160.00320.94
8.3.100.0040.00424.06
8.3.90.0120.00326.77
8.3.80.0030.00618.55
8.3.70.0100.00716.75
8.3.60.0070.01118.55
8.3.50.0110.00818.55
8.3.40.0000.01619.13
8.3.30.0090.00619.04
8.3.20.0060.00319.23
8.3.10.0140.00322.15
8.3.00.0110.00422.70
8.2.290.0110.00920.48
8.2.280.0090.01118.57
8.2.270.0150.00617.50
8.2.260.0040.00420.78
8.2.250.0180.00016.63
8.2.240.0080.00019.30
8.2.230.0000.01022.58
8.2.220.0040.01137.54
8.2.210.0060.00326.77
8.2.200.0030.00616.75
8.2.190.0000.01516.75
8.2.180.0230.00316.63
8.2.170.0140.00722.96
8.2.160.0070.00720.77
8.2.150.0040.00424.18
8.2.140.0110.00724.66
8.2.130.0060.00921.29
8.2.120.0070.00026.35
8.2.110.0030.00719.57
8.2.100.0040.00718.16
8.2.90.0050.00321.39
8.2.80.0050.00319.27
8.2.70.0030.00617.88
8.2.60.0040.00417.88
8.2.50.0040.00417.75
8.2.40.0000.00817.75
8.2.30.0040.00421.49
8.2.20.0040.00418.30
8.2.10.0040.00418.36
8.2.00.0000.00719.66
8.1.330.0120.00722.16
8.1.320.0100.00916.60
8.1.310.0090.00918.29
8.1.300.0030.01618.02
8.1.290.0030.00630.84
8.1.280.0120.00925.92
8.1.270.0040.00422.39
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0140.00722.42
8.1.230.0080.00423.07
8.1.220.0050.00317.93
8.1.210.0080.00019.14
8.1.200.0030.00617.50
8.1.190.0040.00417.50
8.1.180.0080.00018.10
8.1.170.0050.00219.40
8.1.160.0040.00419.11
8.1.150.0080.00019.32
8.1.140.0000.00717.89
8.1.130.0030.00519.25
8.1.120.0040.00417.75
8.1.110.0040.00417.62
8.1.100.0000.00717.75
8.1.90.0070.00017.75
8.1.80.0030.00717.59
8.1.70.0050.00317.72
8.1.60.0090.00317.87
8.1.50.0000.00817.80
8.1.40.0030.00617.74
8.1.30.0030.00517.93
8.1.20.0000.00817.94
8.1.10.0060.00317.89
8.1.00.0050.00517.84
8.0.300.0000.00820.46
8.0.290.0040.00417.13
8.0.280.0000.00718.68
8.0.270.0050.00517.59
8.0.260.0000.00717.59
8.0.250.0030.00317.32
8.0.240.0000.00717.20
8.0.230.0050.00217.30
8.0.220.0030.00617.25
8.0.210.0000.00717.14
8.0.200.0070.00017.30
8.0.190.0040.00417.34
8.0.180.0040.00417.24
8.0.170.0000.00917.28
8.0.160.0060.00617.24
8.0.150.0040.00417.07
8.0.140.0050.00217.10
8.0.130.0000.00613.66
8.0.120.0060.00317.18
8.0.110.0040.00417.16
8.0.100.0000.00817.13
8.0.90.0040.00417.25
8.0.80.0090.00617.34
8.0.70.0040.00417.20
8.0.60.0040.00417.07
8.0.50.0070.00017.05
8.0.30.0090.00917.34
8.0.20.0100.01017.44
8.0.10.0000.00717.34
8.0.00.0120.00617.07
7.4.330.0020.00215.55
7.4.320.0060.00016.84
7.4.300.0030.00316.75
7.4.290.0000.00716.91
7.4.280.0070.00016.74
7.4.270.0030.00316.96
7.4.260.0000.00716.86
7.4.250.0070.00016.77
7.4.240.0040.00416.95
7.4.230.0000.00716.83
7.4.220.0040.00416.93
7.4.210.0080.00716.89
7.4.200.0020.00516.66
7.4.160.0130.00816.95
7.4.140.0130.00817.86
7.4.130.0130.00417.02
7.4.120.0090.01016.87
7.4.110.0150.00316.93
7.4.100.0090.00916.91
7.4.90.0130.00516.98
7.4.80.0110.01119.39
7.4.70.0130.00316.77
7.4.60.0030.01416.77
7.4.50.0030.01316.55
7.4.40.0100.00716.64
7.4.00.0110.00315.02
7.3.330.0050.00013.38
7.3.320.0030.00313.22
7.3.310.0030.00316.37
7.3.300.0070.00016.40
7.3.290.0040.00416.47
7.3.280.0070.00916.43
7.3.260.0090.01116.56
7.3.240.0100.00616.61
7.3.230.0120.01216.47
7.3.210.0070.01016.80
7.3.200.0150.00616.73
7.3.190.0070.01016.50
7.3.180.0060.01216.49
7.3.170.0160.00616.82
7.3.160.0030.01416.49
7.2.330.0060.01216.77
7.2.320.0070.01016.98
7.2.310.0070.01116.57
7.2.300.0060.01216.71
7.2.290.0070.01116.69
7.2.110.0170.01016.50
7.2.60.0000.01216.80
7.2.50.0100.01016.97
7.2.40.4180.01118.31
7.2.30.4500.01317.79
7.2.20.4730.01418.07
7.2.10.3500.01117.57
7.2.00.4080.01018.17
7.1.200.0000.00915.90
7.1.160.4190.01016.89
7.1.150.4960.00917.12
7.1.140.3710.01016.98
7.1.130.3520.00817.05
7.1.120.3240.00916.89
7.1.110.3280.00616.02
7.1.100.3720.00516.25
7.1.90.3690.00516.39
7.1.80.4170.00816.17
7.1.70.4080.00815.36
7.1.60.3670.00733.23
7.1.50.5270.01333.07
7.1.40.7550.01032.66
7.1.30.8500.01232.64
7.1.20.9560.01632.95
7.1.10.8820.01014.77
7.1.00.1010.01214.89

preferences:
50.02 ms | 403 KiB | 5 Q