3v4l.org

run code in 500+ 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 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/FkCDr
function name:  (null)
number of ops:  23
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, ->21
         12    > > FE_FETCH_R                                                   $11, !3, ->21
   13    13    >   FETCH_OBJ_R                                          ~12     !3, 'nodeValue'
         14        FRAMELESS_ICALL_2                strstr              ~13     ~12, 'Treatment'
         15        TYPE_CHECK                                      1018          ~13
         16      > JMPZ                                                         ~14, ->20
   14    17    >   INIT_METHOD_CALL                                             !3, 'C14N'
         18        DO_FCALL                                          0  $15     
         19        ECHO                                                         $15
   12    20    > > JMP                                                          ->12
         21    >   FE_FREE                                                      $11
   16    22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
205.98 ms | 2065 KiB | 13 Q