3v4l.org

run code in 300+ PHP versions simultaneously
<?php $score_url = 'http://vowgag.com/to/23335/'; $headers = get_headers($score_url); $response = substr($headers[0], 9, 3); $html = file_get_contents($score_url); $html2 = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); $classname = 'entry-content'; $ogtitle = 'og:title'; $dom = new DOMDocument; $dom->loadHTML($html2); $xpath = new DOMXPath($dom); //$results = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]"); $results2 = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]/img[1]/@src"); $results3 = $xpath->query("//meta[@property='" . $ogtitle . "']/@content"); foreach ($results2 as $parseimg){ $parseimgurl = parse_url($parseimg->nodue.""); } echo $parseimgurl;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 47, Position 2 = 55
Branch analysis from position: 47
2 jumps found. (Code = 78) Position 1 = 48, Position 2 = 55
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
filename:       /in/8fv51
function name:  (null)
number of ops:  58
compiled vars:  !0 = $score_url, !1 = $headers, !2 = $response, !3 = $html, !4 = $html2, !5 = $classname, !6 = $ogtitle, !7 = $dom, !8 = $xpath, !9 = $results2, !10 = $results3, !11 = $parseimg, !12 = $parseimgurl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fvowgag.com%2Fto%2F23335%2F'
    4     1        INIT_FCALL                                               'get_headers'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $14     
          4        ASSIGN                                                   !1, $14
    5     5        INIT_FCALL                                               'substr'
          6        FETCH_DIM_R                                      ~16     !1, 0
          7        SEND_VAL                                                 ~16
          8        SEND_VAL                                                 9
          9        SEND_VAL                                                 3
         10        DO_ICALL                                         $17     
         11        ASSIGN                                                   !2, $17
    6    12        INIT_FCALL                                               'file_get_contents'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $19     
         15        ASSIGN                                                   !3, $19
    7    16        INIT_FCALL                                               'mb_convert_encoding'
         17        SEND_VAR                                                 !3
         18        SEND_VAL                                                 'HTML-ENTITIES'
         19        SEND_VAL                                                 'UTF-8'
         20        DO_ICALL                                         $21     
         21        ASSIGN                                                   !4, $21
    8    22        ASSIGN                                                   !5, 'entry-content'
    9    23        ASSIGN                                                   !6, 'og%3Atitle'
   10    24        NEW                                              $25     'DOMDocument'
         25        DO_FCALL                                      0          
         26        ASSIGN                                                   !7, $25
   11    27        INIT_METHOD_CALL                                         !7, 'loadHTML'
         28        SEND_VAR_EX                                              !4
         29        DO_FCALL                                      0          
   12    30        NEW                                              $29     'DOMXPath'
         31        SEND_VAR_EX                                              !7
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !8, $29
   14    34        INIT_METHOD_CALL                                         !8, 'query'
         35        CONCAT                                           ~32     '%28%2F%2Fdiv%5B%40class%3D%27', !5
         36        CONCAT                                           ~33     ~32, '%27%5D%29%5B1%5D%2Fp%2Fa%5B1%5D%2Fimg%5B1%5D%2F%40src'
         37        SEND_VAL_EX                                              ~33
         38        DO_FCALL                                      0  $34     
         39        ASSIGN                                                   !9, $34
   15    40        INIT_METHOD_CALL                                         !8, 'query'
         41        CONCAT                                           ~36     '%2F%2Fmeta%5B%40property%3D%27', !6
         42        CONCAT                                           ~37     ~36, '%27%5D%2F%40content'
         43        SEND_VAL_EX                                              ~37
         44        DO_FCALL                                      0  $38     
         45        ASSIGN                                                   !10, $38
   17    46      > FE_RESET_R                                       $40     !9, ->55
         47    > > FE_FETCH_R                                               $40, !11, ->55
   18    48    >   INIT_FCALL                                               'parse_url'
         49        FETCH_OBJ_R                                      ~41     !11, 'nodue'
         50        CONCAT                                           ~42     ~41, ''
         51        SEND_VAL                                                 ~42
         52        DO_ICALL                                         $43     
         53        ASSIGN                                                   !12, $43
   17    54      > JMP                                                      ->47
         55    >   FE_FREE                                                  $40
   20    56        ECHO                                                     !12
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.46 ms | 1469 KiB | 18 Q