3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.flightstats.com/go/FlightStatus/flightStatusByFlight.do?airlineCode=FR&amp;flightNumber=2220"); //curl_setopt($ch, CURLOPT_FILE, $fp); $html = curl_exec($ch); // grab URL and pass it to the browser //$data = curl_exec($ch); //var_dump($data); // close cURL resource, and free up system resources curl_close($ch); $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXpath($doc); // example 1: for everything with an id //$elements = $xpath->query("//*[@id]"); // example 2: for node data in a selected id //$elements = $xpath->query("/html/body/div[@id='yourTagIdHere']"); // example 3: same as above with wildcard $elements = $xpath->query("*/div[@class='flightStatusByFlightBlock']"); var_dump($elements); //if (!is_null($elements)) { foreach ($elements as $element) { //echo "<br/>[". $element->nodeName. "]"; var_dump($element); //$nodes = $element->childNodes; //foreach ($nodes as $node) { // echo $node->nodeValue. "\n"; //} } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/svdE9
function name:  (null)
number of ops:  41
compiled vars:  !0 = $ch, !1 = $html, !2 = $doc, !3 = $xpath, !4 = $elements, !5 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $6      
          2        ASSIGN                                                   !0, $6
    5     3        INIT_FCALL_BY_NAME                                       'curl_setopt'
          4        SEND_VAR_EX                                              !0
          5        FETCH_CONSTANT                                   ~8      'CURLOPT_URL'
          6        SEND_VAL_EX                                              ~8
          7        SEND_VAL_EX                                              'http%3A%2F%2Fwww.flightstats.com%2Fgo%2FFlightStatus%2FflightStatusByFlight.do%3FairlineCode%3DFR%26amp%3BflightNumber%3D2220'
          8        DO_FCALL                                      0          
    7     9        INIT_FCALL_BY_NAME                                       'curl_exec'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !1, $10
   12    13        INIT_FCALL_BY_NAME                                       'curl_close'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
   15    16        NEW                                              $13     'DOMDocument'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !2, $13
   16    19        INIT_METHOD_CALL                                         !2, 'loadHTML'
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0          
   17    22        NEW                                              $17     'DOMXpath'
         23        SEND_VAR_EX                                              !2
         24        DO_FCALL                                      0          
         25        ASSIGN                                                   !3, $17
   25    26        INIT_METHOD_CALL                                         !3, 'query'
         27        SEND_VAL_EX                                              '%2A%2Fdiv%5B%40class%3D%27flightStatusByFlightBlock%27%5D'
         28        DO_FCALL                                      0  $20     
         29        ASSIGN                                                   !4, $20
   26    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !4
         32        DO_ICALL                                                 
   28    33      > FE_RESET_R                                       $23     !4, ->39
         34    > > FE_FETCH_R                                               $23, !5, ->39
   30    35    >   INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !5
         37        DO_ICALL                                                 
   28    38      > JMP                                                      ->34
         39    >   FE_FREE                                                  $23
   40    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.57 ms | 1400 KiB | 15 Q