3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = array( 'http://www.website.com/path1/path2/file1.php?query1=true&query2=false', 'http://website.com/path1/path2/file1.php?query1=true&query2=false', 'http://website/path1/path2/file1.php?query1=true&query2=false', 'http://www.website.com/path1/path2/?query1=true&query2=false', 'http://website.com/path1/path2/?query1=true&query2=false', 'http://website/path1/path2/?query1=true&query2=false', 'http://www.website.com/path1/path2/', 'http://website.com/path1/path2/', 'http://website/path1/path2/', 'http://www.website.com?query1=true&query2=false', 'http://website.com?query1=true&query2=false', 'http://website?query1=true&query2=false', 'www.website.com/path1/path2/file1.php?query1=true&query2=false', 'website.com/path1/path2/file1.php?query1=true&query2=false', 'website/path1/path2/file1.php?query1=true&query2=false', 'www.website.com/path1/path2/?query1=true&query2=false', 'website.com/path1/path2/?query1=true&query2=false', 'website/path1/path2/?query1=true&query2=false', 'www.website.com/path1/path2/', 'website.com/path1/path2/', 'website/path1/path2/', 'www.website.com?query1=true&query2=false', 'website.com?query1=true&query2=false', 'website?query1=true&query2=false', ); $flags = array( null, FILTER_FLAG_SCHEME_REQUIRED, FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED, FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED, FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED & FILTER_FLAG_QUERY_REQUIRED ); foreach($urls as $url){ foreach($flags as $flag){ var_dump((bool) filter_var($url, FILTER_VALIDATE_URL, $flag)); } echo "\r\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 37
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 37
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 34
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 34
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 34
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/2l7jC
function name:  (null)
number of ops:  39
compiled vars:  !0 = $urls, !1 = $flags, !2 = $url, !3 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   30     1        INIT_ARRAY                                       ~5      null
   31     2        FETCH_CONSTANT                                   ~6      'FILTER_FLAG_SCHEME_REQUIRED'
          3        ADD_ARRAY_ELEMENT                                ~5      ~6
   32     4        FETCH_CONSTANT                                   ~7      'FILTER_FLAG_SCHEME_REQUIRED'
          5        FETCH_CONSTANT                                   ~8      'FILTER_FLAG_HOST_REQUIRED'
          6        BW_AND                                           ~9      ~7, ~8
          7        ADD_ARRAY_ELEMENT                                ~5      ~9
   33     8        FETCH_CONSTANT                                   ~10     'FILTER_FLAG_SCHEME_REQUIRED'
          9        FETCH_CONSTANT                                   ~11     'FILTER_FLAG_HOST_REQUIRED'
         10        BW_AND                                           ~12     ~10, ~11
   30    11        BW_AND                                           ~13     ~12, 262144
         12        ADD_ARRAY_ELEMENT                                ~5      ~13
   34    13        FETCH_CONSTANT                                   ~14     'FILTER_FLAG_SCHEME_REQUIRED'
         14        FETCH_CONSTANT                                   ~15     'FILTER_FLAG_HOST_REQUIRED'
         15        BW_AND                                           ~16     ~14, ~15
   30    16        BW_AND                                           ~17     ~16, 262144
         17        BW_AND                                           ~18     ~17, 524288
         18        ADD_ARRAY_ELEMENT                                ~5      ~18
   29    19        ASSIGN                                                   !1, ~5
   37    20      > FE_RESET_R                                       $20     !0, ->37
         21    > > FE_FETCH_R                                               $20, !2, ->37
   38    22    > > FE_RESET_R                                       $21     !1, ->34
         23    > > FE_FETCH_R                                               $21, !3, ->34
   39    24    >   INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'filter_var'
         26        SEND_VAR                                                 !2
         27        SEND_VAL                                                 273
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $22     
         30        BOOL                                             ~23     $22
         31        SEND_VAL                                                 ~23
         32        DO_ICALL                                                 
   38    33      > JMP                                                      ->23
         34    >   FE_FREE                                                  $21
   41    35        ECHO                                                     '%0D%0A'
   37    36      > JMP                                                      ->21
         37    >   FE_FREE                                                  $20
   42    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.15 ms | 1400 KiB | 17 Q