3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isFileUrl($url){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // don't want it rendered to browser curl_exec($ch); if(curl_errno($ch)){ $isFile = false; } else { $isFile = true; } curl_close($ch); return $isFile; } if(isFileUrl('https://www.google.com/images/srpr/logo4w.png')==true){ echo 'TRUE'; } else { echo 'FALSE'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbkqf
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'isfileurl'
          1        SEND_VAL                                                 'https%3A%2F%2Fwww.google.com%2Fimages%2Fsrpr%2Flogo4w.png'
          2        DO_FCALL                                      0  $0      
          3        BOOL                                             ~1      $0
          4      > JMPZ                                                     ~1, ->7
   18     5    >   ECHO                                                     'TRUE'
          6      > JMP                                                      ->8
   20     7    >   ECHO                                                     'FALSE'
   21     8    > > RETURN                                                   1

Function isfileurl:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbkqf
function name:  isFileUrl
number of ops:  26
compiled vars:  !0 = $url, !1 = $ch, !2 = $isFile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
    4     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !1
          7        FETCH_CONSTANT                                   ~5      'CURLOPT_RETURNTRANSFER'
          8        SEND_VAL_EX                                              ~5
          9        SEND_VAL_EX                                              1
         10        DO_FCALL                                      0          
    5    11        INIT_FCALL_BY_NAME                                       'curl_exec'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
    7    14        INIT_FCALL_BY_NAME                                       'curl_errno'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $8      
         17      > JMPZ                                                     $8, ->20
    8    18    >   ASSIGN                                                   !2, <false>
         19      > JMP                                                      ->21
   11    20    >   ASSIGN                                                   !2, <true>
   13    21    >   INIT_FCALL_BY_NAME                                       'curl_close'
         22        SEND_VAR_EX                                              !1
         23        DO_FCALL                                      0          
   14    24      > RETURN                                                   !2
   15    25*     > RETURN                                                   null

End of function isfileurl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.47 ms | 1407 KiB | 14 Q