3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<< HTML <html> <body> <table> <tr><td>foo</td><td>bar</td></tr> <tr><td>foo</td><td>bar</td></tr> <tr><td>foo</td><td>bar</td></tr> <tr><td>foo</td><td>bar</td></tr> </table> </body> </html> HTML; $dom = new domdocument; $dom->loadhtml($html); $x = new domxpath($dom); $trs = $x->query('//tr'); foreach ($trs as $tr) { var_dump($tr); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/e8co1
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $dom, !2 = $x, !3 = $trs, !4 = $tr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%0A%3Cbody%3E%0A%3Ctable%3E%0A%3Ctr%3E%3Ctd%3Efoo%3C%2Ftd%3E%3Ctd%3Ebar%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3Efoo%3C%2Ftd%3E%3Ctd%3Ebar%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3Efoo%3C%2Ftd%3E%3Ctd%3Ebar%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3Efoo%3C%2Ftd%3E%3Ctd%3Ebar%3C%2Ftd%3E%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   16     1        NEW                                              $6      'domdocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   17     4        INIT_METHOD_CALL                                         !1, 'loadhtml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   18     7        NEW                                              $10     'domxpath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   19    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Ftr'
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !3, $13
   20    15      > FE_RESET_R                                       $15     !3, ->21
         16    > > FE_FETCH_R                                               $15, !4, ->21
   21    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                                 
   20    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $15
   22    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.11 ms | 1395 KiB | 15 Q