3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <root>Тест кириллицы</root> '; $original = new DOMDocument; $original->loadXML($xml); echo $original->saveXML(); echo PHP_EOL . PHP_EOL; // this is code from \SebastianBergmann\Comparator\DOMNodeComparator::nodeToText $document = new DOMDocument; @$document->loadXML($original->C14N()); echo $document->saveXML(); echo PHP_EOL . PHP_EOL; // if I add utf-8 xml header then document is good $document = new DOMDocument; @$document->loadXML('<?xml version="1.0" encoding="' . $original->encoding . '"?>' . PHP_EOL . $original->C14N()); echo $document->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.3.130.0050.00318.57
8.3.120.0030.00620.71
8.3.110.0030.00616.75
8.3.100.0080.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00616.88
8.3.70.0110.00416.86
8.3.60.0110.00418.43
8.3.50.0090.00917.65
8.3.40.0180.00019.14
8.3.30.0100.00518.87
8.3.20.0080.00022.10
8.3.10.0030.00719.20
8.3.00.0030.00522.21
8.2.250.0060.00918.66
8.2.240.0130.00619.16
8.2.230.0060.00320.94
8.2.220.0040.00437.54
8.2.210.0090.00626.77
8.2.200.0060.00316.88
8.2.190.0040.01416.75
8.2.180.0060.00925.92
8.2.170.0110.00422.96
8.2.160.0060.00922.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00026.16
8.2.110.0050.00521.25
8.2.100.0080.00318.16
8.2.90.0030.00518.09
8.2.80.0000.00918.18
8.2.70.0000.00818.14
8.2.60.0000.00918.47
8.2.50.0000.00819.64
8.2.40.0040.00419.52
8.2.30.0040.00420.66
8.2.20.0000.00818.30
8.2.10.0060.00319.16
8.2.00.0000.00820.11
8.1.300.0060.00316.33
8.1.290.0180.00030.84
8.1.280.0120.00325.92
8.1.270.0040.00421.00
8.1.260.0100.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00424.04
8.1.230.0040.00821.04
8.1.220.0080.00018.04
8.1.210.0040.00419.09
8.1.200.0060.00317.47
8.1.190.0050.00317.61
8.1.180.0080.00018.10
8.1.170.0050.00318.77
8.1.160.0040.00419.09
8.1.150.0000.00719.25
8.1.140.0030.00320.57
8.1.130.0070.00022.29
8.1.120.0040.00417.58
8.1.110.0000.00817.74
8.1.100.0000.00717.75
8.1.90.0000.00817.72
8.1.80.0080.00017.70
8.1.70.0000.00917.68
8.1.60.0000.00817.85
8.1.50.0040.00417.83
8.1.40.0000.00817.88
8.1.30.0040.00417.92
8.1.20.0000.00817.93
8.1.10.0000.00817.70
8.1.00.0000.00817.83
8.0.300.0040.00419.87
8.0.290.0040.00416.84
8.0.280.0030.00318.70
8.0.270.0040.00417.56
8.0.260.0000.00618.64
8.0.250.0030.00317.13
8.0.240.0030.00317.24
8.0.230.0040.00417.23
8.0.220.0030.00317.19
8.0.210.0040.00417.08
8.0.200.0030.00317.25
8.0.190.0050.00217.25
8.0.180.0050.00217.06
8.0.170.0000.00817.10
8.0.160.0080.00017.22
8.0.150.0040.00417.21
8.0.140.0000.00817.14
8.0.130.0000.00513.55
8.0.120.0050.00317.02
8.0.110.0030.00517.10
8.0.100.0040.00417.18
8.0.90.0040.00417.00
8.0.80.0070.00717.21
8.0.70.0050.00217.10
8.0.60.0000.00817.09
8.0.50.0020.00517.16
8.0.30.0140.00417.09
8.0.20.0130.00717.31
8.0.10.0000.00717.23
8.0.00.0100.01116.99
7.4.330.0000.00517.08
7.4.320.0030.00316.91
7.4.300.0060.00016.81
7.4.290.0050.00316.70
7.4.280.0000.00816.76
7.4.270.0000.00916.79
7.4.260.0040.00416.90
7.4.250.0080.00016.86
7.4.240.0060.00316.81
7.4.230.0040.00416.84
7.4.220.0000.00816.56
7.4.210.0070.00916.87
7.4.200.0000.00716.89
7.4.160.0040.01216.63
7.4.140.0170.00617.86
7.4.130.0110.00816.85
7.4.120.0070.01116.82
7.4.110.0140.00316.59
7.4.100.0070.01317.00
7.4.90.0180.00716.79
7.4.80.0100.00719.39
7.4.70.0070.01116.83
7.4.60.0000.01716.63
7.4.50.0120.00216.74
7.4.40.0000.01916.81
7.4.00.0100.00714.96
7.3.330.0000.00613.36
7.3.320.0000.00613.25
7.3.310.0040.00416.40
7.3.300.0000.00716.55
7.3.290.0040.00416.46
7.3.280.0120.00316.42
7.3.260.0100.00916.68
7.3.240.0130.00616.67
7.3.230.0040.01216.78
7.3.210.0060.01216.54
7.3.200.0070.01116.49
7.3.190.0060.00916.45
7.3.180.0070.01016.47
7.3.170.0150.00016.64
7.3.160.0120.00916.79
7.3.50.0030.01014.71
7.3.40.0190.00614.85
7.3.30.0150.00614.91
7.3.20.0200.00016.57
7.3.10.0120.00016.67
7.3.00.0120.00916.63
7.2.330.0100.00716.83
7.2.320.0080.00816.93
7.2.310.0040.01416.99
7.2.300.0100.00716.73
7.2.290.0160.00616.59
7.2.180.0090.00915.24
7.2.170.0220.00415.21
7.2.160.0130.00315.30
7.2.150.0100.01017.16
7.2.140.0130.01316.99
7.2.130.0090.01317.09
7.2.120.0090.00917.06
7.2.110.0130.01016.88
7.2.100.0000.01616.84
7.2.90.0060.00617.02
7.2.80.0040.00717.04
7.2.70.0060.00617.07
7.2.60.0070.00717.10
7.2.50.0070.00717.09
7.2.40.0060.00617.09
7.2.30.0060.00617.15
7.2.20.0000.02017.04
7.2.10.0130.01017.14
7.2.00.0090.00617.00
7.1.280.0050.00915.76
7.1.270.0060.00615.68
7.1.260.0090.00915.87
7.1.250.0030.01815.94

preferences:
17.21 ms | 403 KiB | 5 Q