3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<!DOCTYPE html><html dir="ltr" lang="en-US">testing<head>la</head>testing1<body>um<p id="test">laaa</p></body></html>'; $html = '<!DOCTYPE html><html dir="ltr" lang="en-US"><head></head><body id="testing">um<p id="test">laaa</p></body></html>'; $dom = new DOMDocument; $dom->loadHTML($html); $tags = $dom->getElementsByTagName('body'); foreach ($tags as $tag) { var_dump($tag); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/9WScH
function name:  (null)
number of ops:  20
compiled vars:  !0 = $html, !1 = $dom, !2 = $tags, !3 = $tag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+html%3E%3Chtml+dir%3D%22ltr%22+lang%3D%22en-US%22%3Etesting%3Chead%3Ela%3C%2Fhead%3Etesting1%3Cbody%3Eum%3Cp+id%3D%22test%22%3Elaaa%3C%2Fp%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
    3     1        ASSIGN                                                   !0, '%3C%21DOCTYPE+html%3E%3Chtml+dir%3D%22ltr%22+lang%3D%22en-US%22%3E%3Chead%3E%3C%2Fhead%3E%3Cbody+id%3D%22testing%22%3Eum%3Cp+id%3D%22test%22%3Elaaa%3C%2Fp%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
    4     2        NEW                                              $6      'DOMDocument'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
    5     5        INIT_METHOD_CALL                                         !1, 'loadHTML'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
    6     8        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          9        SEND_VAL_EX                                              'body'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
    7    12      > FE_RESET_R                                       $12     !2, ->18
         13    > > FE_FETCH_R                                               $12, !3, ->18
    8    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
    7    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $12
    9    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.87 ms | 1395 KiB | 15 Q