3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html= file_get_contents('http://www.yelp.com/biz/franchino-san-francisco?start=80'); $html = escapeshellarg($html) ; $html = nl2br($html); $classname = 'rating-qualifier'; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); $results = $xpath->query("//*[@class='" . $classname . "']"); if ($results->length > 0) { echo $review = $results->item(0)->nodeValue; } $classname = 'review_comment ieSucks'; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); $results = $xpath->query("//*[@class='" . $classname . "']"); if ($results->length > 0) { echo $review = $results->item(0)->nodeValue; } $meta = $dom->documentElement->getElementsByTagName("meta"); echo $meta->item(0)->getAttribute('content'); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 38
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 64
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
Branch analysis from position: 38
filename:       /in/bIKC7
function name:  (null)
number of ops:  77
compiled vars:  !0 = $html, !1 = $classname, !2 = $dom, !3 = $xpath, !4 = $results, !5 = $review, !6 = $meta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'http%3A%2F%2Fwww.yelp.com%2Fbiz%2Ffranchino-san-francisco%3Fstart%3D80'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !0, $7
    4     4        INIT_FCALL                                               'escapeshellarg'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !0, $9
    5     8        INIT_FCALL                                               'nl2br'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !0, $11
    7    12        ASSIGN                                                   !1, 'rating-qualifier'
    8    13        NEW                                              $14     'DOMDocument'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $14
    9    16        INIT_METHOD_CALL                                         !2, 'loadHTML'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
   10    19        NEW                                              $18     'DOMXPath'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !3, $18
   11    23        INIT_METHOD_CALL                                         !3, 'query'
         24        CONCAT                                           ~21     '%2F%2F%2A%5B%40class%3D%27', !1
         25        CONCAT                                           ~22     ~21, '%27%5D'
         26        SEND_VAL_EX                                              ~22
         27        DO_FCALL                                      0  $23     
         28        ASSIGN                                                   !4, $23
   13    29        FETCH_OBJ_R                                      ~25     !4, 'length'
         30        IS_SMALLER                                               0, ~25
         31      > JMPZ                                                     ~26, ->38
   14    32    >   INIT_METHOD_CALL                                         !4, 'item'
         33        SEND_VAL_EX                                              0
         34        DO_FCALL                                      0  $27     
         35        FETCH_OBJ_R                                      ~28     $27, 'nodeValue'
         36        ASSIGN                                           ~29     !5, ~28
         37        ECHO                                                     ~29
   18    38    >   ASSIGN                                                   !1, 'review_comment+ieSucks'
   19    39        NEW                                              $31     'DOMDocument'
         40        DO_FCALL                                      0          
         41        ASSIGN                                                   !2, $31
   20    42        INIT_METHOD_CALL                                         !2, 'loadHTML'
         43        SEND_VAR_EX                                              !0
         44        DO_FCALL                                      0          
   21    45        NEW                                              $35     'DOMXPath'
         46        SEND_VAR_EX                                              !2
         47        DO_FCALL                                      0          
         48        ASSIGN                                                   !3, $35
   22    49        INIT_METHOD_CALL                                         !3, 'query'
         50        CONCAT                                           ~38     '%2F%2F%2A%5B%40class%3D%27', !1
         51        CONCAT                                           ~39     ~38, '%27%5D'
         52        SEND_VAL_EX                                              ~39
         53        DO_FCALL                                      0  $40     
         54        ASSIGN                                                   !4, $40
   24    55        FETCH_OBJ_R                                      ~42     !4, 'length'
         56        IS_SMALLER                                               0, ~42
         57      > JMPZ                                                     ~43, ->64
   25    58    >   INIT_METHOD_CALL                                         !4, 'item'
         59        SEND_VAL_EX                                              0
         60        DO_FCALL                                      0  $44     
         61        FETCH_OBJ_R                                      ~45     $44, 'nodeValue'
         62        ASSIGN                                           ~46     !5, ~45
         63        ECHO                                                     ~46
   28    64    >   FETCH_OBJ_R                                      ~47     !2, 'documentElement'
         65        INIT_METHOD_CALL                                         ~47, 'getElementsByTagName'
         66        SEND_VAL_EX                                              'meta'
         67        DO_FCALL                                      0  $48     
         68        ASSIGN                                                   !6, $48
   29    69        INIT_METHOD_CALL                                         !6, 'item'
         70        SEND_VAL_EX                                              0
         71        DO_FCALL                                      0  $50     
         72        INIT_METHOD_CALL                                         $50, 'getAttribute'
         73        SEND_VAL_EX                                              'content'
         74        DO_FCALL                                      0  $51     
         75        ECHO                                                     $51
   30    76      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.15 ms | 1400 KiB | 19 Q