3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<< HTML <a>some stuff we don not want</a> <table cellpadding="2" cellspacing="1" bgcolor="#A0A0A0"> </table> <table id="anothertable"> </table> HTML; $dom = new DOMDocument(); $dom->loadHTML($input); foreach ($dom->getElementsByTagName('table') as $element) { var_dump($element); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/281RB
function name:  (null)
number of ops:  18
compiled vars:  !0 = $input, !1 = $dom, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%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'
   10     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   11     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   13     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'table'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->16
         11    > > FE_FETCH_R                                               $9, !2, ->16
   14    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   13    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $9
   15    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.33 ms | 1395 KiB | 15 Q