3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dom = new DOMDocument(); @$dom->loadHTML('<html><div class="ipc-inline-list "><ul class="ipc-inline "><li>1</li><li>2</li><li>3</li></ol</div></html>'); $finder = new DomXPath($dom); $class_ops = 'ipc-inline-list '; $class_opp = 'ipc-inline '; $node = $finder->query("//div[@class='$class_ops']//ul[@class='$class_opp']/li"); foreach ($node as $index => $t) { echo $t->textContent.", "; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 30
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/Mvfud
function name:  (null)
number of ops:  32
compiled vars:  !0 = $dom, !1 = $finder, !2 = $class_ops, !3 = $class_opp, !4 = $node, !5 = $t, !6 = $index
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   NEW                                                  $7      'DOMDocument'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $7
    3     3        BEGIN_SILENCE                                        ~10     
          4        INIT_METHOD_CALL                                             !0, 'loadHTML'
          5        SEND_VAL_EX                                                  '%3Chtml%3E%3Cdiv+class%3D%22ipc-inline-list+%22%3E%3Cul+class%3D%22ipc-inline+%22%3E%3Cli%3E1%3C%2Fli%3E%3Cli%3E2%3C%2Fli%3E%3Cli%3E3%3C%2Fli%3E%3C%2Fol%3C%2Fdiv%3E%3C%2Fhtml%3E'
          6        DO_FCALL                                          0          
          7        END_SILENCE                                                  ~10
    4     8        NEW                                                  $12     'DomXPath'
          9        SEND_VAR_EX                                                  !0
         10        DO_FCALL                                          0          
         11        ASSIGN                                                       !1, $12
    5    12        ASSIGN                                                       !2, 'ipc-inline-list+'
    6    13        ASSIGN                                                       !3, 'ipc-inline+'
    7    14        INIT_METHOD_CALL                                             !1, 'query'
         15        ROPE_INIT                                         5  ~18     '%2F%2Fdiv%5B%40class%3D%27'
         16        ROPE_ADD                                          1  ~18     ~18, !2
         17        ROPE_ADD                                          2  ~18     ~18, '%27%5D%2F%2Ful%5B%40class%3D%27'
         18        ROPE_ADD                                          3  ~18     ~18, !3
         19        ROPE_END                                          4  ~17     ~18, '%27%5D%2Fli'
         20        SEND_VAL_EX                                                  ~17
         21        DO_FCALL                                          0  $21     
         22        ASSIGN                                                       !4, $21
    8    23      > FE_RESET_R                                           $23     !4, ->30
         24    > > FE_FETCH_R                                           ~24     $23, !5, ->30
         25    >   ASSIGN                                                       !6, ~24
    9    26        FETCH_OBJ_R                                          ~26     !5, 'textContent'
         27        CONCAT                                               ~27     ~26, '%2C+'
         28        ECHO                                                         ~27
    8    29      > JMP                                                          ->24
         30    >   FE_FREE                                                      $23
   10    31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.19 ms | 1877 KiB | 13 Q