3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadHTMLFile("http://dailypress2.com/newsroom/airports/list/"); $xpath = new DOMXPath($dom); var_dump($xpath->query("//a[starts-with(@href, '/newsroom/airports/')]")->length);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN1RK
function name:  (null)
number of ops:  18
compiled vars:  !0 = $dom, !1 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'loadHTMLFile'
          4        SEND_VAL_EX                                              'http%3A%2F%2Fdailypress2.com%2Fnewsroom%2Fairports%2Flist%2F'
          5        DO_FCALL                                      0          
    5     6        NEW                                              $6      'DOMXPath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
    7    10        INIT_FCALL                                               'var_dump'
         11        INIT_METHOD_CALL                                         !1, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fa%5Bstarts-with%28%40href%2C+%27%2Fnewsroom%2Fairports%2F%27%29%5D'
         13        DO_FCALL                                      0  $9      
         14        FETCH_OBJ_R                                      ~10     $9, 'length'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.32 ms | 1394 KiB | 15 Q