3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = array( 'invalid path', 'http://myhost.com/image.jpg', 'https://mysslhost.com/image.jpg', ); foreach ($paths as $path) { $is_full_path = 0 !== preg_match('@^http:\/\/@', $path); echo sprintf("'%s' %s is a full path.\n", $path, ($is_full_path ? 'YES' : 'NO')); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/oQdKu
function name:  (null)
number of ops:  22
compiled vars:  !0 = $paths, !1 = $path, !2 = $is_full_path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $4      !0, ->20
          2    > > FE_FETCH_R                                               $4, !1, ->20
   10     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%40%5Ehttp%3A%5C%2F%5C%2F%40'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        IS_NOT_IDENTICAL                                 ~6      $5, 0
          8        ASSIGN                                                   !2, ~6
   12     9        INIT_FCALL                                               'sprintf'
         10        SEND_VAL                                                 '%27%25s%27+%25s+is+a+full+path.%0A'
         11        SEND_VAR                                                 !1
         12      > JMPZ                                                     !2, ->15
         13    >   QM_ASSIGN                                        ~8      'YES'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~8      'NO'
         16    >   SEND_VAL                                                 ~8
         17        DO_ICALL                                         $9      
         18        ECHO                                                     $9
    9    19      > JMP                                                      ->2
         20    >   FE_FREE                                                  $4
   13    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.34 ms | 1395 KiB | 17 Q