3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = '<thead><tr><th>Day</th><th>Date</th><th>Duty</th><th>From</th><th>Report</th><th>To</th><th>Release</th><th>Flight Time</th><th>Duty Time</th><th>TAFB Time</th><th>Rest Time</th><th>Sector(s)/Event(s)</th></tr></thead>'; $dom = new DOMDocument(); $dom->loadHTML($subject); $xpath = new DOMXPath($dom); $headers = $xpath->query('//thead/tr/th'); foreach ($headers as $th) { var_dump($th->textContent); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/6mIfq
function name:  (null)
number of ops:  24
compiled vars:  !0 = $subject, !1 = $dom, !2 = $xpath, !3 = $headers, !4 = $th
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cthead%3E%3Ctr%3E%3Cth%3EDay%3C%2Fth%3E%3Cth%3EDate%3C%2Fth%3E%3Cth%3EDuty%3C%2Fth%3E%3Cth%3EFrom%3C%2Fth%3E%3Cth%3EReport%3C%2Fth%3E%3Cth%3ETo%3C%2Fth%3E%3Cth%3ERelease%3C%2Fth%3E%3Cth%3EFlight+Time%3C%2Fth%3E%3Cth%3EDuty+Time%3C%2Fth%3E%3Cth%3ETAFB+Time%3C%2Fth%3E%3Cth%3ERest+Time%3C%2Fth%3E%3Cth%3ESector%28s%29%2FEvent%28s%29%3C%2Fth%3E%3C%2Ftr%3E%3C%2Fthead%3E'
    5     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    6     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        NEW                                              $10     'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
    9    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fthead%2Ftr%2Fth'
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !3, $13
   11    15      > FE_RESET_R                                       $15     !3, ->22
         16    > > FE_FETCH_R                                               $15, !4, ->22
   12    17    >   INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_R                                      ~16     !4, 'textContent'
         19        SEND_VAL                                                 ~16
         20        DO_ICALL                                                 
   11    21      > JMP                                                      ->16
         22    >   FE_FREE                                                  $15
   13    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.5 ms | 1396 KiB | 15 Q