3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<p 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'); var_dump($attr); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 13
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 13
Branch analysis from position: 27
Branch analysis from position: 13
filename:       /in/Vi9kb
function name:  (null)
number of ops:  28
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+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                                                      ->24
    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        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                                 
    8    23        PRE_INC                                                  !3
         24    >   FETCH_OBJ_R                                      ~18     !2, 'length'
         25        IS_SMALLER                                               !3, ~18
         26      > JMPNZ                                                    ~19, ->13
   12    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.74 ms | 1396 KiB | 15 Q