3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html_string = '<div style="font-family:comic sans ms,cursive;"> <div style="font-size:200%;">Some Text </div></div>'; $dom = new DOMDocument; $dom->loadHTML($html_string); $divs = $dom->getElementsByTagName('div'); for($i=0;$i<$divs->length;$i++) { $attrib = $divs->item($i)->getAttribute("style"); echo $attrib; echo '<br />'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 13
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 13
Branch analysis from position: 26
Branch analysis from position: 13
filename:       /in/fB93m
function name:  (null)
number of ops:  27
compiled vars:  !0 = $html_string, !1 = $dom, !2 = $divs, !3 = $i, !4 = $attrib
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdiv+style%3D%22font-family%3Acomic+sans+ms%2Ccursive%3B%22%3E%0A%3Cdiv+style%3D%22font-size%3A200%25%3B%22%3ESome+Text+%3C%2Fdiv%3E%3C%2Fdiv%3E'
    4     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    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  $10     
         10        ASSIGN                                                   !2, $10
    8    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->23
    9    13    >   INIT_METHOD_CALL                                         !2, 'item'
         14        SEND_VAR_EX                                              !3
         15        DO_FCALL                                      0  $13     
         16        INIT_METHOD_CALL                                         $13, 'getAttribute'
         17        SEND_VAL_EX                                              'style'
         18        DO_FCALL                                      0  $14     
         19        ASSIGN                                                   !4, $14
   10    20        ECHO                                                     !4
   11    21        ECHO                                                     '%3Cbr+%2F%3E'
    8    22        PRE_INC                                                  !3
         23    >   FETCH_OBJ_R                                      ~17     !2, 'length'
         24        IS_SMALLER                                               !3, ~17
         25      > JMPNZ                                                    ~18, ->13
   12    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.69 ms | 1399 KiB | 13 Q