3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<p class="asdf" style="font-size: 12px;">ASDF</p>'; $dom1 = new DOMDocument(); $dom1->loadHTML($s); $p = $dom1->getElementsByTagName('p'); for ($i=0; $i < $p->length; $i++) { $attr = $p->item($i)->getAttribute('style'); echo $attr; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
Branch analysis from position: 13
filename:       /in/Bm5je
function name:  (null)
number of ops:  26
compiled vars:  !0 = $s, !1 = $dom1, !2 = $p, !3 = $i, !4 = $attr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp+class%3D%22asdf%22+style%3D%22font-size%3A+12px%3B%22%3EASDF%3C%2Fp%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                                              'p'
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !2, $10
    8    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->22
    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
   11    20        ECHO                                                     !4
    8    21        PRE_INC                                                  !3
         22    >   FETCH_OBJ_R                                      ~17     !2, 'length'
         23        IS_SMALLER                                               !3, ~17
         24      > JMPNZ                                                    ~18, ->13
   12    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.56 ms | 1394 KiB | 13 Q