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($peices); $i++) { $args = explode("=", $peices[$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/v5Z8p
function name:  (null)
number of ops:  31
compiled vars:  !0 = $url, !1 = $ss_url_args, !2 = $pieces, !3 = $i, !4 = $args, !5 = $peices, !6 = $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                                         $8      
          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                                                      ->26
   10    14    >   INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '%3D'
         16        FETCH_DIM_R                                      ~13     !5, !3
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !4, $14
   11    20        FETCH_DIM_R                                      ~16     !4, 0
         21        IS_IDENTICAL                                             ~16, 'key'
         22      > JMPZ                                                     ~17, ->25
   13    23    >   FETCH_DIM_R                                      ~18     !4, 1
         24        ASSIGN                                                   !6, ~18
    8    25    >   PRE_INC                                                  !3
         26    >   COUNT                                            ~21     !5
         27        IS_SMALLER                                               !3, ~21
         28      > JMPNZ                                                    ~22, ->14
   16    29    >   ECHO                                                     !6
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.77 ms | 1396 KiB | 17 Q