3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SimpleXMLExtended extends SimpleXMLElement { public function addCData($cdata_text) { $node = dom_import_simplexml($this); $no = $node->ownerDocument; $node->appendChild($no->createCDATASection($cdata_text)); } } $oXML = new SimpleXMLExtended('<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0" />'); $oChannel = $oXML->addChild('channel'); $oChannel->addChild('title', 'TEST'); $oProduct = $oChannel->addChild('item'); $oProduct->addChild('product_type', 'used', 'http://base.google.com/ns/1.0'); echo $oXML->asXML();

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.130.0120.00918.09
8.4.120.0160.00420.66
8.4.110.0060.00522.93
8.4.100.0080.01118.08
8.4.90.0090.00818.99
8.4.80.0100.00619.50
8.4.70.0090.01118.09
8.4.60.0120.00724.12
8.4.50.0100.01018.63
8.4.40.0130.00719.61
8.4.30.0080.00319.00
8.4.20.0070.01420.92
8.4.10.0000.01717.88
8.3.260.0160.00316.96
8.3.250.0030.00618.91
8.3.240.0150.00416.88
8.3.230.0120.00816.72
8.3.220.0100.00717.40
8.3.210.0080.01118.55
8.3.200.0050.00416.78
8.3.190.0110.01117.43
8.3.180.0130.00616.55
8.3.170.0060.01217.31
8.3.160.0180.00016.85
8.3.150.0110.00718.43
8.3.140.0000.00817.59
8.3.130.0080.00018.42
8.3.120.0090.00018.53
8.3.110.0060.00316.84
8.3.100.0040.00420.35
8.3.90.0020.00518.45
8.3.80.0000.00918.43
8.3.70.0090.00918.68
8.3.60.0120.00318.59
8.3.50.0120.00521.23
8.3.40.0080.00818.75
8.3.30.0120.00318.78
8.3.20.0040.00421.85
8.3.10.0000.00822.26
8.3.00.0040.00422.64
8.2.290.0080.01220.75
8.2.280.0040.00318.79
8.2.270.0110.00717.39
8.2.260.0110.00716.85
8.2.250.0070.01016.75
8.2.240.0060.00317.49
8.2.230.0000.00920.94
8.2.220.0050.00524.06
8.2.210.0170.00326.77
8.2.200.0060.00317.00
8.2.190.0180.00317.00
8.2.180.0120.00918.66
8.2.170.0070.01422.96
8.2.160.0070.00722.33
8.2.150.0050.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0030.00722.52
8.2.100.0080.00418.09
8.2.90.0080.00018.09
8.2.80.0000.00818.15
8.2.70.0100.00018.05
8.2.60.0060.00318.34
8.2.50.0030.00618.10
8.2.40.0060.00219.61
8.2.30.0040.00419.43
8.2.20.0000.00718.29
8.2.10.0000.00719.40
8.2.00.0080.00019.48
8.1.330.0120.00622.17
8.1.320.0120.00716.30
8.1.310.0080.00018.75
8.1.300.0070.01318.14
8.1.290.0110.00018.88
8.1.280.0140.00025.92
8.1.270.0080.00020.84
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0140.00722.73
8.1.230.0050.00522.99
8.1.220.0040.00717.91
8.1.210.0050.00318.89
8.1.200.0080.00017.47
8.1.190.0030.00617.35
8.1.180.0040.00718.10
8.1.170.0030.00518.66
8.1.160.0000.00721.04
8.1.150.0000.00719.08
8.1.140.0050.00321.16
8.1.130.0000.01020.34
8.1.120.0030.00317.76
8.1.110.0000.00717.54
8.1.100.0060.00317.68
8.1.90.0000.00817.73
8.1.80.0000.00717.60
8.1.70.0000.00817.70
8.1.60.0090.00017.76
8.1.50.0040.00417.76
8.1.40.0040.00417.56
8.1.30.0030.00617.87
8.1.20.0080.00017.78
8.1.10.0040.00417.80
8.1.00.0000.01117.64
8.0.300.0040.00819.79
8.0.290.0040.00416.88
8.0.280.0070.00018.72
8.0.270.0000.00717.54
8.0.260.0000.00620.35
8.0.250.0040.00417.23
8.0.240.0040.00417.07
8.0.230.0070.00017.00
8.0.220.0030.00317.13
8.0.210.0090.00017.16
8.0.200.0030.00317.19
8.0.190.0050.00317.21
8.0.180.0030.00517.13
8.0.170.0040.00416.98
8.0.160.0040.00417.11
8.0.150.0000.00717.06
8.0.140.0040.00416.93
8.0.130.0000.00613.54
8.0.120.0040.00416.92
8.0.110.0000.00816.91
8.0.100.0070.00016.92
8.0.90.0020.00517.14
8.0.80.0030.01317.00
8.0.70.0040.00416.80
8.0.60.0000.00716.88
8.0.50.0070.00017.08
8.0.30.0150.00317.49
8.0.20.0100.01617.44
8.0.10.0000.00717.28
8.0.00.0080.01216.88
7.4.330.0030.00317.08
7.4.320.0000.00616.74
7.4.300.0000.00716.69
7.4.290.0030.00316.80
7.4.280.0030.00616.64
7.4.270.0070.00016.90
7.4.260.0000.00613.55
7.4.250.0000.00716.77
7.4.240.0030.00516.75
7.4.230.0000.00816.72
7.4.220.0040.00316.83
7.4.210.0100.00816.77
7.4.200.0030.00316.77
7.4.130.0040.01416.73
7.4.120.0070.01016.78
7.4.110.0050.01316.41
7.4.100.0090.01316.80
7.4.90.0120.00916.78
7.4.80.0070.01119.39
7.4.70.0030.01316.67
7.4.60.0080.00816.58
7.4.50.0040.01416.74
7.4.40.0070.01016.60
7.4.00.0090.00914.99
7.3.330.0040.00416.29
7.3.320.0000.00613.50
7.3.310.0030.00316.45
7.3.300.0030.00316.44
7.3.290.0030.00316.34
7.3.280.0030.01116.43
7.3.260.0090.01016.55
7.3.240.0100.00716.58
7.3.230.0100.01016.63
7.3.210.0100.00716.54
7.3.200.0060.00916.52
7.3.190.0070.01016.57
7.3.180.0090.00916.52
7.3.170.0090.01316.60
7.3.160.0060.01116.38
7.3.80.0140.00314.93
7.3.70.0100.00514.81
7.3.60.0120.00414.78
7.3.50.0030.01314.70
7.3.40.0110.00314.88
7.3.30.0100.00614.82
7.3.20.0110.01014.86
7.3.10.0170.00714.85
7.3.00.0130.00914.78
7.2.330.0120.00916.65
7.2.320.0100.00616.90
7.2.310.0130.00916.56
7.2.300.0140.00716.66
7.2.290.0060.01316.98
7.2.210.0060.01215.13
7.2.200.0120.00515.04
7.2.190.0120.00415.19
7.2.180.0090.00815.00
7.2.170.0050.01315.00
7.2.160.0080.00715.00
7.2.150.0140.00515.01
7.2.140.0150.01215.06
7.2.130.0140.00815.03
7.2.120.0130.00915.10
7.2.110.0090.01215.15
7.2.100.0110.00914.96
7.2.90.0160.00615.01
7.2.80.0120.01015.28
7.2.70.0100.00915.09
7.2.60.0130.01015.12
7.2.50.0120.01115.19
7.2.40.0170.00615.10
7.2.30.0150.00815.25
7.2.20.0260.00715.14
7.2.10.0140.00815.09
7.2.00.0100.01115.33
7.1.310.0110.01013.95
7.1.300.0100.01113.91
7.1.290.0070.01313.79
7.1.280.0170.00313.89
7.1.270.0090.00913.80
7.1.260.0180.00613.68
7.1.250.0110.00813.86

preferences:
31.27 ms | 403 KiB | 5 Q