3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content-Type: text/plain"); $xml = <<<EOT <table> <tr> <td class="standard">Delivery Time</td> <td class="standard">10/1/2013 10:03AM</td> </tr> <tr> <td class="standard">Delivery Time</td> <td class="standard">10/1/2013 11:03AM</td> </tr> <tr> <td class="standard">Delivery Time</td> <td class="standard">10/1/2013 12:03AM</td> </tr> </table> EOT; $doc = new DOMDocument(); $doc->loadXML($xml); $xpath = new DOMXPath($doc); foreach($xpath->query('//tr/td[@class="standard"][2]/text()') as $node) { echo $node->nodeValue."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/q3pJX
function name:  (null)
number of ops:  25
compiled vars:  !0 = $xml, !1 = $doc, !2 = $xpath, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fplain'
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, '%3Ctable%3E%0A%09%3Ctr%3E%0A%09%09%3Ctd+class%3D%22standard%22%3EDelivery+Time%3C%2Ftd%3E%0A%09%09%3Ctd+class%3D%22standard%22%3E10%2F1%2F2013+10%3A03AM%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%09%3Ctr%3E%0A%09%09%3Ctd+class%3D%22standard%22%3EDelivery+Time%3C%2Ftd%3E%0A%09%09%3Ctd+class%3D%22standard%22%3E10%2F1%2F2013+11%3A03AM%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%09%3Ctr%3E%0A%09%09%3Ctd+class%3D%22standard%22%3EDelivery+Time%3C%2Ftd%3E%0A%09%09%3Ctd+class%3D%22standard%22%3E10%2F1%2F2013+12%3A03AM%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%3C%2Ftable%3E'
   22     4        NEW                                              $6      'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
   23     7        INIT_METHOD_CALL                                         !1, 'loadXML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
   25    10        NEW                                              $10     'DOMXPath'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $10
   27    14        INIT_METHOD_CALL                                         !2, 'query'
         15        SEND_VAL_EX                                              '%2F%2Ftr%2Ftd%5B%40class%3D%22standard%22%5D%5B2%5D%2Ftext%28%29'
         16        DO_FCALL                                      0  $13     
         17      > FE_RESET_R                                       $14     $13, ->23
         18    > > FE_FETCH_R                                               $14, !3, ->23
   29    19    >   FETCH_OBJ_R                                      ~15     !3, 'nodeValue'
         20        CONCAT                                           ~16     ~15, '%0A'
         21        ECHO                                                     ~16
   27    22      > JMP                                                      ->18
         23    >   FE_FREE                                                  $14
   30    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.74 ms | 1396 KiB | 15 Q