3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'selenagomez'; //$_GET['username'] /* # Use the Curl extension to query Google and get back a page of results $url = "http://instagram.myhacks.net/processing_request.php?username=$username"; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $html = curl_exec($ch); curl_close($ch); $dom = new DOMDocument(); @$dom->loadHTML($html); foreach($dom->getElementsByid('#current-followers-value') as $link) { # Show the <a href> echo $link->first_child()->plaintext; echo "<br />"; } */ $page = "http://instagram.myhacks.net/processing_request.php?username=" . $username; $dom = new DOMDocument(); @$dom->loadHTML($page); $xpath = new DomXpath($dom); foreach($xpath->query("//tr[@class='row profile-info-row']") as $row){ echo $xpath->query(".//span[contains(@id,'current-followers-value')]",$row)->item(0)->nodeValue."\n"; echo 7*7; } echo 7*7; /* include('simple_html_dom.php'); $followerslink = $html->getElementById('current-followers-value'); echo $followerslink->textContent; echo "<br />"; */ ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 32
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 32
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/ljkoj
function name:  (null)
number of ops:  35
compiled vars:  !0 = $username, !1 = $page, !2 = $dom, !3 = $xpath, !4 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'selenagomez'
   30     1        CONCAT                                           ~6      'http%3A%2F%2Finstagram.myhacks.net%2Fprocessing_request.php%3Fusername%3D', !0
          2        ASSIGN                                                   !1, ~6
   31     3        NEW                                              $8      'DOMDocument'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $8
   32     6        BEGIN_SILENCE                                    ~11     
          7        INIT_METHOD_CALL                                         !2, 'loadHTML'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        END_SILENCE                                              ~11
   33    11        NEW                                              $13     'DomXpath'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !3, $13
   35    15        INIT_METHOD_CALL                                         !3, 'query'
         16        SEND_VAL_EX                                              '%2F%2Ftr%5B%40class%3D%27row+profile-info-row%27%5D'
         17        DO_FCALL                                      0  $16     
         18      > FE_RESET_R                                       $17     $16, ->32
         19    > > FE_FETCH_R                                               $17, !4, ->32
   36    20    >   INIT_METHOD_CALL                                         !3, 'query'
         21        SEND_VAL_EX                                              '.%2F%2Fspan%5Bcontains%28%40id%2C%27current-followers-value%27%29%5D'
         22        SEND_VAR_EX                                              !4
         23        DO_FCALL                                      0  $18     
         24        INIT_METHOD_CALL                                         $18, 'item'
         25        SEND_VAL_EX                                              0
         26        DO_FCALL                                      0  $19     
         27        FETCH_OBJ_R                                      ~20     $19, 'nodeValue'
         28        CONCAT                                           ~21     ~20, '%0A'
         29        ECHO                                                     ~21
   37    30        ECHO                                                     49
   35    31      > JMP                                                      ->19
         32    >   FE_FREE                                                  $17
   39    33        ECHO                                                     49
   50    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.39 ms | 1399 KiB | 13 Q