3v4l.org

run code in 500+ PHP versions simultaneously
<?php function custom_parse_url($url) { if (version_compare(phpversion(), '7.0.0beta1') < 0) { return parse_url('test://'.$url); } else { return parse_url($url); } } $url = "_search?q=sku:89399"; var_dump(custom_parse_url($url));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dN2bP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $url
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                       !0, '_search%3Fq%3Dsku%3A89399'
   11     1        INIT_FCALL                                                   'var_dump'
          2        INIT_FCALL                                                   'custom_parse_url'
          3        SEND_VAR                                                     !0
          4        DO_FCALL                                          0  $2      
          5        SEND_VAR                                                     $2
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Function custom_parse_url:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dN2bP
function name:  custom_parse_url
number of ops:  20
compiled vars:  !0 = $url
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        INIT_FCALL                                                   'version_compare'
          2        INIT_FCALL                                                   'phpversion'
          3        DO_ICALL                                             $1      
          4        SEND_VAR                                                     $1
          5        SEND_VAL                                                     '7.0.0beta1'
          6        DO_ICALL                                             $2      
          7        IS_SMALLER                                                   $2, 0
          8      > JMPZ                                                         ~3, ->15
    4     9    >   INIT_FCALL                                                   'parse_url'
         10        CONCAT                                               ~4      'test%3A%2F%2F', !0
         11        SEND_VAL                                                     ~4
         12        DO_ICALL                                             $5      
         13      > RETURN                                                       $5
    3    14*       JMP                                                          ->19
    6    15    >   INIT_FCALL                                                   'parse_url'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                             $6      
         18      > RETURN                                                       $6
    8    19*     > RETURN                                                       null

End of function custom_parse_url

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.7 ms | 2613 KiB | 18 Q