3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadXML('<?xml version="1.0" encoding="UTF-8"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"><text><svg:tspan>T</svg:tspan></text></svg>'); $text = $dom->getElementsByTagName('text')[0]; $switch = $dom->createElementNS('http://www.w3.org/2000/svg', 'switch'); $text->parentNode->insertBefore($switch, $text); $switch->appendChild($text); echo $dom->saveXML($dom->getElementsByTagName('switch')[0]);

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.0050.00316.98
8.5.00.0110.01220.10
8.4.160.0180.00924.13
8.4.150.0030.00014.05
8.4.140.0110.01017.93
8.4.130.0060.00419.04
8.4.120.0100.00524.35
8.4.110.0100.01319.09
8.4.100.0120.01018.02
8.4.90.0040.00519.17
8.4.80.0140.00519.64
8.4.70.0070.00118.05
8.4.60.0110.00918.86
8.4.50.0120.00818.94
8.4.40.0030.01118.05
8.4.30.0100.00618.92
8.4.20.0100.01019.84
8.4.10.0030.01619.79
8.3.280.0110.01018.68
8.3.270.0130.00616.77
8.3.260.0110.00816.97
8.3.250.0110.00919.10
8.3.240.0120.00717.25
8.3.230.0040.00616.92
8.3.220.0090.00517.31
8.3.210.0110.00617.09
8.3.200.0070.00216.88
8.3.190.0100.00818.51
8.3.180.0040.00416.77
8.3.170.0070.01117.46
8.3.160.0100.01018.64
8.3.150.0070.01117.40
8.3.140.0070.01121.06
8.3.130.0080.00818.49
8.3.120.0000.00919.10
8.3.110.0060.00320.94
8.3.100.0000.00718.65
8.3.90.0040.00416.60
8.3.80.0030.00618.55
8.3.70.0000.01616.63
8.3.60.0120.00618.50
8.3.50.0070.01118.54
8.3.40.0030.01722.33
8.3.30.0070.01019.06
8.3.20.0080.00822.25
8.3.10.0080.00822.84
8.3.00.0070.00921.47
8.2.290.0120.00720.64
8.2.280.0090.01216.71
8.2.270.0070.01118.75
8.2.260.0090.00917.30
8.2.250.0130.00718.81
8.2.240.0100.00617.15
8.2.230.0080.00022.58
8.2.220.0170.00324.06
8.2.210.0030.00626.77
8.2.200.0000.01018.79
8.2.190.0140.00417.00
8.2.180.0100.01316.74
8.2.170.0060.01519.25
8.2.160.0070.01021.31
8.2.150.0110.00719.20
8.2.140.0080.00522.04
8.2.130.0050.00622.57
8.2.120.0060.00819.51
8.2.110.0080.00920.46
8.2.100.0110.00419.84
8.2.90.0150.00719.17
8.2.80.0150.00619.31
8.2.70.0160.00618.88
8.2.60.0130.00919.06
8.2.50.0100.00519.58
8.2.40.0070.00719.07
8.2.30.0060.00619.13
8.2.20.0120.00319.08
8.2.10.0090.00419.05
8.2.00.0100.00319.04
8.1.330.0070.00222.21
8.1.320.0110.00916.54
8.1.310.0070.01017.00
8.1.300.0060.00318.09
8.1.290.0040.00818.88
8.1.280.0070.00725.92
8.1.270.0050.00622.82
8.1.260.0080.00224.16
8.1.250.0110.00124.29
8.1.240.0110.00319.42
8.1.230.0140.00718.86
8.1.220.0080.00418.90
8.1.210.0090.00719.06
8.1.200.0090.00518.80
8.1.190.0100.00518.75
8.1.180.0120.00718.53
8.1.170.0080.00618.79
8.1.160.0080.00418.74
8.1.150.0070.00419.47
8.1.140.0060.00818.56
8.1.130.0060.00618.84
8.1.120.0080.00418.79
8.1.110.0090.00318.64
8.1.100.0080.00519.11
8.1.90.0120.00318.70
8.1.80.0050.00719.14
8.1.70.0080.00618.76
8.1.60.0090.00518.77
8.1.50.0080.00618.72
8.1.40.0100.00218.92
8.1.30.0070.00619.08
8.1.20.0090.00419.81
8.1.10.0070.00618.93
8.1.00.0120.00118.78
8.0.300.0090.00317.97
8.0.290.0170.00418.01
8.0.280.0150.00518.12
8.0.270.0120.00418.04
8.0.260.0120.00618.21
8.0.250.0120.00918.69
8.0.240.0160.00518.01
8.0.230.0130.00318.21
8.0.220.0100.00517.87
8.0.210.0130.00517.93
8.0.200.0120.00517.89
8.0.190.0160.00218.15
8.0.180.0110.00418.02
8.0.170.0160.00318.04
8.0.160.0090.00418.09
8.0.150.0130.00617.97
8.0.140.0140.00517.95
8.0.130.0130.00418.14
8.0.120.0130.00817.95
8.0.110.0130.00517.99
8.0.100.0110.00817.98
8.0.90.0170.00517.87
8.0.80.0110.00217.92
8.0.70.0060.00817.96
8.0.60.0150.00418.11
8.0.50.0160.00517.86
8.0.30.0070.00618.25
8.0.20.0060.00818.00
8.0.10.0130.00618.12

preferences:
35.72 ms | 403 KiB | 5 Q