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)['query']; echo $ss_url_args; $pieces = explode("&", $ss_url_args); for($i = 0; $i < count($pieces); $i++) { $args = explode("=", $pieces[$i]); echo($args); if($args[0] === 'key') { $key = $args[1]; } } echo $key;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 14
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 14
Branch analysis from position: 30
Branch analysis from position: 14
Branch analysis from position: 26
filename:       /in/4X6M0
function name:  (null)
number of ops:  32
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        DO_ICALL                                         $7      
          4        FETCH_DIM_R                                      ~8      $7, 'query'
          5        ASSIGN                                                   !1, ~8
    6     6        ECHO                                                     !1
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%26'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !2, $10
    8    12        ASSIGN                                                   !3, 0
         13      > JMP                                                      ->27
   10    14    >   INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '%3D'
         16        FETCH_DIM_R                                      ~13     !2, !3
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !4, $14
   11    20        ECHO                                                     !4
   12    21        FETCH_DIM_R                                      ~16     !4, 0
         22        IS_IDENTICAL                                             ~16, 'key'
         23      > JMPZ                                                     ~17, ->26
   14    24    >   FETCH_DIM_R                                      ~18     !4, 1
         25        ASSIGN                                                   !5, ~18
    8    26    >   PRE_INC                                                  !3
         27    >   COUNT                                            ~21     !2
         28        IS_SMALLER                                               !3, ~21
         29      > JMPNZ                                                    ~22, ->14
   17    30    >   ECHO                                                     !5
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1388 KiB | 17 Q