3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = ' <a>some stuff we don not want</a> <table cellpadding="2" cellspacing="1" bgcolor="#A0A0A0"> </table> <table id="anothertable"> </table>'; $dom = new DOMDocument(); $dom->loadHTML($input); foreach ($dom->getElementsByTagName('table') as $element) { echo $element->nodeValue; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/XhQDH
function name:  (null)
number of ops:  17
compiled vars:  !0 = $input, !1 = $dom, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%0A%3Ca%3Esome+stuff+we+don+not+want%3C%2Fa%3E%0A%3Ctable+cellpadding%3D%222%22+cellspacing%3D%221%22+bgcolor%3D%22%23A0A0A0%22%3E%0A%3C%2Ftable%3E%0A%3Ctable+id%3D%22anothertable%22%3E%0A%3C%2Ftable%3E'
    9     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   10     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   12     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'table'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->15
         11    > > FE_FETCH_R                                               $9, !2, ->15
   13    12    >   FETCH_OBJ_R                                      ~10     !2, 'nodeValue'
         13        ECHO                                                     ~10
   12    14      > JMP                                                      ->11
         15    >   FE_FREE                                                  $9
   14    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.96 ms | 1394 KiB | 13 Q