3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "currenttest"; $dom = new DOMDocument("1.0"); $root = $dom->createElement('tv'); $dom->appendChild($root); $root->appendChild($dom->createTextNode("\n")); $root->appendChild($dom->createTextNode($text)); $root->appendChild($dom->createTextNode("\n")); $xml = $dom->saveXML(); // let's add a new element $newtext = 'newtext'; $dom = new DOMDocument; $dom->loadXML($xml); $root = $dom->documentElement; // conveniant way to target the root element $root->appendChild($dom->createTextNode($newtext)); $newxml = $dom->saveXML(); echo $newxml;

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.30.0110.00719.16
8.5.20.0100.00719.84
8.5.10.0100.00718.65
8.5.00.0170.00520.11
8.4.180.0140.00819.75
8.4.170.0100.01220.59
8.4.160.0110.01124.04
8.4.150.0060.00617.02
8.4.140.0100.01217.86
8.4.130.0100.01222.62
8.4.120.0140.01020.97
8.4.110.0070.00422.83
8.4.100.0100.01018.68
8.4.90.0130.00618.96
8.4.80.0050.00319.06
8.4.70.0110.00918.09
8.4.60.0070.00919.20
8.4.50.0040.00718.98
8.4.40.0060.00317.88
8.4.30.0060.01318.13
8.4.20.0100.01019.66
8.4.10.0030.01619.68
8.3.300.0030.00721.11
8.3.290.0130.00721.13
8.3.280.0180.01118.68
8.3.270.0130.00616.55
8.3.260.0110.00716.82
8.3.250.0130.00619.17
8.3.240.0130.00617.45
8.3.230.0110.00916.93
8.3.220.0130.00619.14
8.3.210.0080.00718.45
8.3.200.0070.00217.02
8.3.190.0100.00919.27
8.3.180.0030.00618.67
8.3.170.0110.00716.98
8.3.160.0040.01420.24
8.3.150.0090.00917.52
8.3.140.0130.00616.57
8.3.130.0050.00518.49
8.3.120.0090.00919.27
8.3.110.0060.01020.94
8.3.100.0070.00716.64
8.3.90.0190.00026.77
8.3.80.0060.00318.55
8.3.70.0160.00316.75
8.3.60.0120.00618.55
8.3.50.0050.00918.55
8.3.40.0100.00618.82
8.3.30.0130.00318.98
8.3.20.0060.00320.32
8.3.10.0000.00722.04
8.3.00.0040.00419.51
8.2.300.0130.00922.25
8.2.290.0140.00620.84
8.2.280.0120.00618.62
8.2.270.0130.00617.39
8.2.260.0040.00419.22
8.2.250.0000.00817.21
8.2.240.0080.00318.94
8.2.230.0100.00022.58
8.2.220.0070.00324.06
8.2.210.0070.01126.77
8.2.200.0030.00716.88
8.2.190.0120.00316.61
8.2.180.0120.00416.88
8.2.170.0090.00622.96
8.2.160.0100.00320.64
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.19
8.2.110.0030.00620.66
8.2.100.0070.00418.03
8.2.90.0000.00818.16
8.2.80.0000.00817.97
8.2.70.0070.00417.75
8.2.60.0070.00317.88
8.2.50.0000.01019.55
8.2.40.0070.00020.84
8.2.30.0000.00719.74
8.2.20.0050.00318.26
8.2.10.0050.00318.45
8.2.00.0050.00218.55
8.1.340.0140.00917.86
8.1.330.0110.00822.27
8.1.320.0110.00816.37
8.1.310.0000.01518.86
8.1.300.0000.00818.20
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0030.00620.48
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00622.71
8.1.230.0080.00323.03
8.1.220.0000.00818.02
8.1.210.0090.00018.93
8.1.200.0080.00017.48
8.1.190.0040.00417.25
8.1.180.0070.00318.10
8.1.170.0080.00018.84
8.1.160.0000.00819.12
8.1.150.0000.00720.53
8.1.140.0000.00817.90
8.1.130.0000.00719.08
8.1.120.0000.00717.71
8.1.110.0000.00717.69
8.1.100.0050.00317.59
8.1.90.0040.00417.54
8.1.80.0040.00417.70
8.1.70.0040.00417.54
8.1.60.0040.00417.70
8.1.50.0050.00217.77
8.1.40.0030.00617.67
8.1.30.0000.00817.89
8.1.20.0060.00317.79
8.1.10.0000.00817.80
8.1.00.0030.00517.69
8.0.300.0080.00020.11
8.0.290.0030.00516.88
8.0.280.0030.00318.75
8.0.270.0000.00817.55
8.0.260.0030.00317.05
8.0.250.0040.00417.17
8.0.240.0000.00717.17
8.0.230.0030.00717.04
8.0.220.0060.00317.11
8.0.210.0040.00417.04
8.0.200.0000.00617.10
8.0.190.0000.00717.05
8.0.180.0040.00417.16
8.0.170.0040.00417.19
8.0.160.0040.00416.95
8.0.150.0090.00317.06
8.0.140.0000.00816.93
8.0.130.0030.00313.54
8.0.120.0000.00717.02
8.0.110.0040.00417.13
8.0.100.0040.00417.04
8.0.90.0040.00416.88
8.0.80.0090.00617.03
8.0.70.0040.00416.96
8.0.60.0070.00017.15
8.0.50.0040.00416.96
8.0.30.0110.00717.33
8.0.20.0130.00817.40
8.0.10.0000.00717.28
8.0.00.0050.01517.04
7.4.330.0000.00515.55
7.4.320.0000.00616.74
7.4.300.0000.00616.63
7.4.290.0040.00416.75
7.4.280.0030.00616.80
7.4.270.0030.00316.70
7.4.260.0040.00416.79
7.4.250.0040.00416.64
7.4.240.0040.00416.79
7.4.230.0050.00216.80
7.4.220.0030.00316.56
7.4.210.0030.01416.77
7.4.200.0000.00816.60
7.4.160.0110.00716.71
7.4.150.0190.01317.40
7.4.140.0090.01017.86
7.4.130.0090.00916.80
7.4.120.0080.01216.72
7.4.110.0110.01116.57
7.4.100.0100.00716.80
7.4.90.0120.00616.71
7.4.80.0160.00619.39
7.4.70.0060.01716.68
7.4.60.0060.01016.82
7.4.50.0000.01116.45
7.4.40.0080.00916.61
7.4.00.0070.00814.96
7.3.330.0000.00513.34
7.3.320.0000.00513.37
7.3.310.0000.00716.55
7.3.300.0030.00316.56
7.3.290.0030.00316.49
7.3.280.0080.01016.46
7.3.270.0040.01417.40
7.3.260.0130.00916.53
7.3.250.0130.00616.53
7.3.240.0090.00916.45
7.3.230.0080.01116.49
7.3.210.0100.00616.84
7.3.200.0110.00816.90
7.3.190.0060.01216.62
7.3.180.0100.00616.62
7.3.170.0060.00916.64
7.3.160.0030.01516.51
7.3.120.0110.00614.87
7.3.110.0080.00914.83
7.3.100.0040.01015.08
7.3.90.0070.00514.93
7.3.80.0030.00814.79
7.3.70.0070.00914.76
7.3.60.0070.00614.85
7.3.50.0060.00914.76
7.3.40.0040.00814.84
7.3.30.0050.01014.93
7.3.20.0030.01216.74
7.3.10.0020.01216.76
7.3.00.0070.00716.61
7.2.330.0100.00716.66
7.2.320.0150.00416.95
7.2.310.0040.01117.04
7.2.300.0070.01016.92
7.2.290.0120.00916.95
7.2.250.0100.00615.31
7.2.240.0060.01015.07
7.2.230.0010.01015.13
7.2.220.0040.00815.00
7.2.210.0050.01314.90
7.2.200.0050.01015.14
7.2.190.0080.00915.08
7.2.180.0030.01215.14
7.2.170.0050.01115.11
7.2.160.0030.01415.14
7.2.150.0030.01016.89
7.2.140.0000.01417.15
7.2.130.0060.01016.82
7.2.120.0170.00017.05
7.2.110.0090.00317.22
7.2.100.0070.01016.84
7.2.90.0070.00717.01
7.2.80.0070.00916.67
7.2.70.0120.00317.08
7.2.60.0030.01116.85
7.2.50.0070.00717.07
7.2.40.0030.00817.04
7.2.30.0080.00316.71
7.2.20.0000.01316.94
7.2.10.0170.01017.83
7.2.00.0110.01117.46
7.1.330.0080.00515.98
7.1.320.0050.00715.77
7.1.310.0060.00815.85
7.1.300.0040.00915.91
7.1.290.0050.01015.80
7.1.280.0050.00815.80
7.1.270.0030.01015.76
7.1.260.0110.00215.82
7.1.250.0030.00715.75
7.1.200.0100.00315.70
7.1.130.0300.01016.87
7.1.120.0260.00717.20
7.1.110.0390.01316.36
7.1.100.0200.01716.12
7.1.90.0390.01416.43
7.1.80.0490.01016.34
7.1.70.0320.01415.52
7.1.60.0610.01332.95
7.1.50.0410.01233.05
7.1.40.0470.00932.68
7.1.30.0420.01332.78
7.1.20.0560.02132.82
7.1.10.0280.00714.80
7.1.00.0230.01114.85

preferences:
110.55 ms | 1589 KiB | 5 Q