3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = array("/category/category.html", "http://google.com"); foreach($urls as $url) { $res = parse_url($url); if(!isset($res['host'])) { echo "$url is a relative URL\n"; } else { echo "$url is a absolute URL\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/8aMfp
function name:  (null)
number of ops:  20
compiled vars:  !0 = $urls, !1 = $url, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                               $4, !1, ->18
    5     3    >   INIT_FCALL                                               'parse_url'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        ISSET_ISEMPTY_DIM_OBJ                         0  ~7      !2, 'host'
          8        BOOL_NOT                                         ~8      ~7
          9      > JMPZ                                                     ~8, ->14
    8    10    >   NOP                                                      
         11        FAST_CONCAT                                      ~9      !1, '+is+a+relative+URL%0A'
         12        ECHO                                                     ~9
         13      > JMP                                                      ->17
   10    14    >   NOP                                                      
         15        FAST_CONCAT                                      ~10     !1, '+is+a+absolute+URL%0A'
         16        ECHO                                                     ~10
    4    17    > > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.97 ms | 1395 KiB | 15 Q