3v4l.org

run code in 300+ PHP versions simultaneously
<?php function nodelist() { return '<table id="foobar"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table>'; } $dom = new DOMDocument('1.0', 'UTF-8'); $dom->loadHTML(nodelist()); $element = $dom->getElementsByTagName('table'); var_dump($element->item(0));die;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/7QtFM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $dom, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'DOMDocument'
          1        SEND_VAL_EX                                              '1.0'
          2        SEND_VAL_EX                                              'UTF-8'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   26     5        INIT_METHOD_CALL                                         !0, 'loadHTML'
          6        INIT_FCALL                                               'nodelist'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR_NO_REF_EX                                       $5
          9        DO_FCALL                                      0          
   28    10        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
         11        SEND_VAL_EX                                              'table'
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !1, $7
   29    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'item'
         16        SEND_VAL_EX                                              0
         17        DO_FCALL                                      0  $9      
         18        SEND_VAR                                                 $9
         19        DO_ICALL                                                 
         20      > EXIT                                                     
         21*     > RETURN                                                   1

Function nodelist:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7QtFM
function name:  nodelist
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   '%3Ctable+id%3D%22foobar%22%3E%0A++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++%3Ctd%3E1%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E2%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E3%3C%2Ftd%3E%0A++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++%3Ctd%3E4%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E5%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E6%3C%2Ftd%3E%0A++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++%3Ctd%3E7%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E8%3C%2Ftd%3E%0A++++++++++++++++++++%3Ctd%3E9%3C%2Ftd%3E%0A++++++++++++++++%3C%2Ftr%3E%0A++++++++++++%3C%2Ftable%3E'
   22     1*     > RETURN                                                   null

End of function nodelist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1390 KiB | 16 Q