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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/2ds9u
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str, !1 = $dom, !2 = $xpath, !3 = $comment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3E%0A%09Evaluation%3C%21--%5Bif+gte+mso+9%5D%3E%3Cxml%3E%0A%3Co%3AOfficeDocumentSettings%3E%0A%3Co%3AAllowPNG+%2F%3E%0A%3Co%3ATargetScreenSize%3E1024x768%3C%2Fo%3ATargetScreenSize%3E%0A%3C%2Fo%3AOfficeDocumentSettings%3E%0A%3C%2Fxml%3E%3C%21%5Bendif%5D--%3E%3C%21--%5Bif+gte+mso+9%5D%3E%3Cxml%3E%0A%3Cw%3AWordDocument%3E%0A%3Cw%3AView%3ENormal%3C%2Fw%3AView%3E%0A%3Cw%3AZoom%3E0%3C%2Fw%3AZoom%3E%0A%3Cw%3AHyphenationZone%3E21%3C%2Fw%3AHyphenationZone%3E%0A%3Cw%3APunctuationKerning+%2F%3E%0A%3Cw%3AValidateAgainstSchemas+%2F%3E%0A%3Cw%3ASaveIfXMLInvalid%3Efalse%3C%2Fw%3ASaveIfXMLInvalid%3E%0A%3Cw%3AIgnoreMixedContent%3Efalse%3C%2Fw%3AIgnoreMixedContent%3E%0A%3Cw%3AAlwaysShowPlaceholderText%3Efalse%3C%2Fw%3AAlwaysShowPlaceholderText%3E%0A%3Cw%3ACompatibility%3E%0A%3Cw%3ABreakWrappedTables+%2F%3E%0A%3Cw%3ASnapToGridInCell+%2F%3E%0A%3Cw%3AWrapTextWithPunct+%2F%3E%0A%3Cw%3AUseAsianBreakRules+%2F%3E%0A%3Cw%3ADontGrowAutofit+%2F%3E%0A%3C%2Fw%3ACompatibility%3E%0A%3C%2Fw%3AWordDocument%3E%0A%3C%2Fxml%3E%3C%21%5Bendif%5D--%3E%3C%21--%5Bif+gte+mso+9%5D%3E%3Cxml%3E%0A%3Cw%3ALatentStyles+DefLockedState%3D%22false%22+LatentStyleCount%3D%22156%22%3E%0A%3C%2Fw%3ALatentStyles%3E%0A%3C%2Fxml%3E%3C%21%5Bendif%5D--%3E%3C%21--%5Bif+gte+mso+10%5D%3E%0A%3Cstyle%3E%0A%2F%2A+Style+Definitions+%2A%2F%0Atable.MsoNormalTable%0A%7Bmso-style-name%3A%22Normale+Tabelle%22%3B%0Amso-tstyle-rowband-size%3A0%3B%0Amso-tstyle-colband-size%3A0%3B%0Amso-style-noshow%3Ayes%3B%0Amso-style-parent%3A%22%22%3B%0Amso-padding-alt%3A0cm+5.4pt+0cm+5.4pt%3B%0Amso-para-margin%3A0cm%3B%0Amso-para-margin-bottom%3A.0001pt%3B%0Amso-pagination%3Awidow-orphan%3B%0Afont-size%3A10.0pt%3B%0Afont-family%3A%22Times+New+Roman%22%3B%0Amso-ansi-language%3A%230400%3B%0Amso-fareast-language%3A%230400%3B%0Amso-bidi-language%3A%230400%3B%7D%0A%3C%2Fstyle%3E%0A%3C%21%5Bendif%5D--%3E%3C%2Fp%3E'
   51     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
   52     4        INIT_METHOD_CALL                                         !1, 'loadHtml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   54     7        NEW                                              $9      'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
   55    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fcomment%28%29'
         13        DO_FCALL                                      0  $12     
         14      > FE_RESET_R                                       $13     $12, ->21
         15    > > FE_FETCH_R                                               $13, !3, ->21
   56    16    >   FETCH_OBJ_R                                      ~14     !3, 'parentNode'
         17        INIT_METHOD_CALL                                         ~14, 'removeChild'
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0          
   55    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $13
   58    22        INIT_METHOD_CALL                                         !1, 'saveXML'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0  $16     
         25        ECHO                                                     $16
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.35 ms | 1399 KiB | 13 Q