3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://test.com/test'; if (filter_var($url, FILTER_VALIDATE_URL)) { if ($host = parse_url($url, PHP_URL_HOST)) { print $host; } print url; } else { print "Fail"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/npYcd
function name:  (null)
number of ops:  18
compiled vars:  !0 = $url, !1 = $host
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Ftest.com%2Ftest'
    5     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 273
          4        DO_ICALL                                         $3      
          5      > JMPZ                                                     $3, ->16
    6     6    >   INIT_FCALL                                               'parse_url'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $4      
         10        ASSIGN                                           ~5      !1, $4
         11      > JMPZ                                                     ~5, ->13
    7    12    >   ECHO                                                     !1
    9    13    >   FETCH_CONSTANT                                   ~6      'url'
         14        ECHO                                                     ~6
         15      > JMP                                                      ->17
   12    16    >   ECHO                                                     'Fail'
   13    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.06 ms | 1395 KiB | 17 Q