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 $path . ' ' . ($is_full_path ? 'YES' : 'NO') . ' is a full path' . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/D5kUF
function name:  (null)
number of ops:  21
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, ->19
          2    > > FE_FETCH_R                                               $4, !1, ->19
   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        CONCAT                                           ~8      !1, '+'
         10      > JMPZ                                                     !2, ->13
         11    >   QM_ASSIGN                                        ~9      'YES'
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~9      'NO'
         14    >   CONCAT                                           ~10     ~8, ~9
         15        CONCAT                                           ~11     ~10, '+is+a+full+path'
         16        CONCAT                                           ~12     ~11, '%0A'
         17        ECHO                                                     ~12
    9    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $4
   13    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.06 ms | 1395 KiB | 15 Q