3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://username:password@hostname/path?arg=value&key=value2#anchor'; $ss_url_args = parse_url($url, PHP_URL_QUERY); echo $ss_url_args; $pieces = explode("&", $ss_url_args); for($i = 0; $i < count($pieces); $i++) { $args = explode("=", $pieces[$i]); if($args[0] === 'key') { $key = $args[1]; } } echo $key;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
Branch analysis from position: 14
Branch analysis from position: 25
filename:       /in/cYfdK
function name:  (null)
number of ops:  31
compiled vars:  !0 = $url, !1 = $ss_url_args, !2 = $pieces, !3 = $i, !4 = $args, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fusername%3Apassword%40hostname%2Fpath%3Farg%3Dvalue%26key%3Dvalue2%23anchor'
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 6
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
    6     6        ECHO                                                     !1
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%26'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    8    12        ASSIGN                                                   !3, 0
         13      > JMP                                                      ->26
   10    14    >   INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '%3D'
         16        FETCH_DIM_R                                      ~12     !2, !3
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !4, $13
   11    20        FETCH_DIM_R                                      ~15     !4, 0
         21        IS_IDENTICAL                                             ~15, 'key'
         22      > JMPZ                                                     ~16, ->25
   13    23    >   FETCH_DIM_R                                      ~17     !4, 1
         24        ASSIGN                                                   !5, ~17
    8    25    >   PRE_INC                                                  !3
         26    >   COUNT                                            ~20     !2
         27        IS_SMALLER                                               !3, ~20
         28      > JMPNZ                                                    ~21, ->14
   16    29    >   ECHO                                                     !5
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1388 KiB | 17 Q