3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findVar($var, $url){ $data = file_get_contents($url); if(strpos($data, $var) == false) return false; $len = strlen($var) + 2; $start = strpos($data, $var."='") + $len; $stop = strpos($data, "'", $start); $val = substr($data, $start, ($stop-$start)); return $val; } echo findVar('indicatorText', 'http://ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FvfVv
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'findvar'
          1        SEND_VAL                                                 'indicatorText'
          2        SEND_VAL                                                 'http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fext-core%2F3.1.0%2Fext-core.js'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function findvar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FvfVv
function name:  findVar
number of ops:  38
compiled vars:  !0 = $var, !1 = $url, !2 = $data, !3 = $len, !4 = $start, !5 = $stop, !6 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'file_get_contents'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    6     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $9      
         10        BOOL_NOT                                         ~10     $9
         11      > JMPZ                                                     ~10, ->13
         12    > > RETURN                                                   <false>
    7    13    >   STRLEN                                           ~11     !0
         14        ADD                                              ~12     ~11, 2
         15        ASSIGN                                                   !3, ~12
    8    16        INIT_FCALL                                               'strpos'
         17        SEND_VAR                                                 !2
         18        CONCAT                                           ~14     !0, '%3D%27'
         19        SEND_VAL                                                 ~14
         20        DO_ICALL                                         $15     
         21        ADD                                              ~16     $15, !3
         22        ASSIGN                                                   !4, ~16
    9    23        INIT_FCALL                                               'strpos'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 '%27'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !5, $18
   10    29        INIT_FCALL                                               'substr'
         30        SEND_VAR                                                 !2
         31        SEND_VAR                                                 !4
         32        SUB                                              ~20     !5, !4
         33        SEND_VAL                                                 ~20
         34        DO_ICALL                                         $21     
         35        ASSIGN                                                   !6, $21
   11    36      > RETURN                                                   !6
   12    37*     > RETURN                                                   null

End of function findvar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.53 ms | 950 KiB | 21 Q