3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div plans="10,11,1000" style="display: none">'; $doc = new DOMDocument; $doc->loadHTML($html); $divs = $doc->getElementsByTagName('div'); var_dump($divs); foreach($divs as $div) { var_dump($div); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/PAduo
function name:  (null)
number of ops:  22
compiled vars:  !0 = $html, !1 = $doc, !2 = $divs, !3 = $div
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv+plans%3D%2210%2C11%2C1000%22+style%3D%22display%3A+none%22%3E'
    4     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
    5     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    6     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'div'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
    8    14      > FE_RESET_R                                       $12     !2, ->20
         15    > > FE_FETCH_R                                               $12, !3, ->20
    9    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
    8    19      > JMP                                                      ->15
         20    >   FE_FREE                                                  $12
   10    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.33 ms | 1395 KiB | 15 Q