3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user_url = 'http://example.com/bla/bla/bla/file.ext'; if (stripos($user_url, 'https://') === 0) { $user_url = substr($user_url, 6); } elseif (stripos($user_url, 'http://') === 0) { $user_url = substr($user_url, 5); } echo $user_url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/rJbvJ
function name:  (null)
number of ops:  26
compiled vars:  !0 = $user_url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fexample.com%2Fbla%2Fbla%2Fbla%2Ffile.ext'
    6     1        INIT_FCALL                                               'stripos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'https%3A%2F%2F'
          4        DO_ICALL                                         $2      
          5        IS_IDENTICAL                                             $2, 0
          6      > JMPZ                                                     ~3, ->13
    7     7    >   INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 6
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
         12      > JMP                                                      ->24
    8    13    >   INIT_FCALL                                               'stripos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'http%3A%2F%2F'
         16        DO_ICALL                                         $6      
         17        IS_IDENTICAL                                             $6, 0
         18      > JMPZ                                                     ~7, ->24
    9    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 5
         22        DO_ICALL                                         $8      
         23        ASSIGN                                                   !0, $8
   12    24    >   ECHO                                                     !0
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.54 ms | 1395 KiB | 17 Q