3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $text="<h2>Introduction of Abdominal aortic aneurysm</h2> <p>In this section, we will learn about symptom, causes, and treatment of AAA</p> <h2>This is Treatment for a burst AAA</h2><p>.......<p> <h2>.........</h2>"; $dom->loadHTML($text); $elms = $dom->getElementsByTagName("h2"); foreach($elms as $elm) { if (strstr($elm->nodeValue, "Treatment") !== false) { echo $elm->C14N(); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 24
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 24
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 23
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/FkCDr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dom, !1 = $text, !2 = $elms, !3 = $elm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN                                                   !1, '%3Ch2%3EIntroduction+of+Abdominal+aortic+aneurysm%3C%2Fh2%3E%0A%3Cp%3EIn+this+section%2C+we+will+learn+about+symptom%2C+causes%2C+and+treatment+of+%0AAAA%3C%2Fp%3E%0A%3Ch2%3EThis+is+Treatment+for+a+burst+AAA%3C%2Fh2%3E%3Cp%3E.......%3Cp%3E%0A%3Ch2%3E.........%3C%2Fh2%3E'
   10     4        INIT_METHOD_CALL                                         !0, 'loadHTML'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
   11     7        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'h2'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
   12    11      > FE_RESET_R                                       $11     !2, ->24
         12    > > FE_FETCH_R                                               $11, !3, ->24
   13    13    >   INIT_FCALL                                               'strstr'
         14        FETCH_OBJ_R                                      ~12     !3, 'nodeValue'
         15        SEND_VAL                                                 ~12
         16        SEND_VAL                                                 'Treatment'
         17        DO_ICALL                                         $13     
         18        TYPE_CHECK                                  1018          $13
         19      > JMPZ                                                     ~14, ->23
   14    20    >   INIT_METHOD_CALL                                         !3, 'C14N'
         21        DO_FCALL                                      0  $15     
         22        ECHO                                                     $15
   12    23    > > JMP                                                      ->12
         24    >   FE_FREE                                                  $11
   16    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.05 ms | 1003 KiB | 14 Q