3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<p> Evaluation<!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG /> <o:TargetScreenSize>1024x768</o:TargetScreenSize> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Normale Tabelle"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--></p>'; $dom = new DOMDocument; $dom->loadHtml($str); $xpath = new DOMXPath($dom); foreach ($xpath->query('//comment()') as $comment) { $comment->parentNode->removeChild($comment); } echo $dom->saveXML($str);

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.60.0110.00717.38
8.3.50.0100.00616.65
8.3.40.0060.00919.20
8.3.30.0110.00319.09
8.3.20.0040.00420.67
8.3.10.0070.00024.09
8.3.00.0050.00324.03
8.2.180.0140.00717.00
8.2.170.0090.00622.96
8.2.160.0140.00020.89
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0040.00420.10
8.2.120.0000.00726.35
8.2.110.0030.00620.68
8.2.100.0090.00518.16
8.2.90.0030.00619.78
8.2.80.0080.00418.30
8.2.70.0040.00417.88
8.2.60.0000.00818.30
8.2.50.0040.00518.13
8.2.40.0030.00622.64
8.2.30.0070.00319.81
8.2.20.0050.00318.04
8.2.10.0020.00518.46
8.2.00.0040.00418.59
8.1.280.0120.00325.92
8.1.270.0100.00022.29
8.1.260.0000.00828.09
8.1.250.0050.00228.09
8.1.240.0000.00924.10
8.1.230.0030.00921.42
8.1.220.0030.00618.16
8.1.210.0040.00418.77
8.1.200.0040.00417.73
8.1.190.0000.00817.72
8.1.180.0080.00018.10
8.1.170.0000.00819.00
8.1.160.0000.00721.14
8.1.150.0000.00719.18
8.1.140.0000.00819.83
8.1.130.0000.00718.08
8.1.120.0040.00417.92
8.1.110.0040.00417.88
8.1.100.0040.00417.86
8.1.90.0040.00417.87
8.1.80.0000.00717.72
8.1.70.0040.00417.90
8.1.60.0040.00417.96
8.1.50.0000.00917.93
8.1.40.0080.00017.94
8.1.30.0050.00317.99
8.1.20.0050.00317.85
8.1.10.0000.00817.81
8.1.00.0040.00417.77
8.0.300.0000.00718.77
8.0.290.0000.00916.98
8.0.280.0030.00318.70
8.0.270.0000.00717.65
8.0.260.0000.00717.64
8.0.250.0070.00017.33
8.0.240.0030.00517.40
8.0.230.0000.00817.27
8.0.220.0000.00717.30
8.0.210.0030.00317.33
8.0.200.0030.00517.41
8.0.190.0000.00717.41
8.0.180.0020.00517.36
8.0.170.0060.00317.37
8.0.160.0030.00517.26
8.0.150.0040.00417.28
8.0.140.0040.00417.28
8.0.130.0030.00313.82
8.0.120.0080.00017.19
8.0.110.0000.00817.35
8.0.100.0040.00417.24
8.0.90.0070.00017.24
8.0.80.0040.01117.33
8.0.70.0080.00017.19
8.0.60.0040.00417.16
8.0.50.0000.00717.27
8.0.30.0120.00517.61
8.0.20.0100.00917.44
8.0.10.0040.00417.19
8.0.00.0100.00817.21
7.4.330.0050.00215.33
7.4.320.0060.00016.94
7.4.300.0000.00716.95
7.4.290.0070.00016.86
7.4.280.0050.00516.78
7.4.270.0070.00016.84
7.4.260.0070.00016.70
7.4.250.0050.00316.97
7.4.240.0040.00416.88
7.4.230.0030.00516.99
7.4.220.0060.01216.87
7.4.210.0070.01216.98
7.4.200.0040.00416.73
7.4.160.0130.01016.74
7.4.150.0100.01017.40
7.4.140.0110.00617.86
7.4.130.0090.00816.90
7.4.120.0050.01216.92
7.4.110.0070.01016.81
7.4.100.0120.01316.76
7.4.90.0030.01317.04
7.4.80.0130.01019.39
7.4.70.0110.00717.06
7.4.60.0070.01016.93
7.4.50.0090.00617.05
7.4.40.0080.01216.72
7.4.30.0130.01017.02
7.4.00.0040.00815.23
7.3.330.0030.00313.42
7.3.320.0050.00013.41
7.3.310.0000.00716.66
7.3.300.0030.00316.43
7.3.290.0000.00716.63
7.3.280.0080.00716.61
7.3.270.0110.00717.40
7.3.260.0080.00816.92
7.3.250.0080.01016.67
7.3.240.0070.01216.70
7.3.230.0120.00616.94
7.3.210.0130.00916.70
7.3.200.0060.01019.39
7.3.190.0030.01616.57
7.3.180.0070.01016.73
7.3.170.0030.01216.75
7.3.160.0080.00816.59
7.2.330.0150.00417.17
7.2.320.0110.01116.86
7.2.310.0100.00716.73
7.2.300.0100.00717.01
7.2.290.0090.00917.14
7.2.60.0100.00716.86
7.2.00.0040.00819.66
7.1.200.0040.01116.01
7.1.100.0040.01118.30
7.1.70.0040.01117.07
7.1.60.0120.01219.30
7.1.50.0130.00916.82
7.1.00.0000.08022.57
7.0.200.0050.00516.88
7.0.60.0200.06021.84
7.0.50.0100.07018.07
7.0.40.0170.04020.18
7.0.30.0270.07320.14
7.0.20.0330.04020.39
7.0.10.0000.06720.18
7.0.00.0030.06020.26
5.6.280.0030.04321.32
5.6.210.0170.07320.91
5.6.200.0000.07018.36
5.6.190.0100.03720.57
5.6.180.0470.07020.57
5.6.170.0370.06320.85
5.6.160.0130.04320.69
5.6.150.0100.06718.36
5.6.140.0070.08018.32
5.6.130.0170.06318.32
5.6.120.0100.05321.18
5.6.110.0030.04321.22
5.6.100.0070.06721.18
5.6.90.0070.04721.15
5.6.80.0100.07020.54
5.5.350.0230.04720.49
5.5.340.0070.04318.07
5.5.330.0070.03720.43
5.5.320.0230.04320.49
5.5.310.0370.07020.38
5.5.300.0130.03318.18
5.5.290.0070.07318.06
5.5.280.0030.05720.91
5.5.270.0100.04021.05
5.5.260.0070.08720.97
5.5.250.0100.05320.55
5.5.240.0270.06020.32

preferences:
57.08 ms | 401 KiB | 5 Q