3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getQueryVariables($queryString) { $vars = explode('&', $queryString); $pairs = []; for ($i = 0; $i < count($vars); $i++) { $element = explode('=', $vars[$i]); $pairs[] = [$element[0] => $element[1]]; } return $pairs; } // $query = $_SERVER['QUERY_STRING']; $query = 'abc=qwer&abc=1234'; var_dump(getQueryVariables($query));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o6h2O
function name:  (null)
number of ops:  8
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 'abc%3Dqwer%26abc%3D1234'
   15     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'getqueryvariables'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getqueryvariables:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
Branch analysis from position: 9
filename:       /in/o6h2O
function name:  getQueryVariables
number of ops:  26
compiled vars:  !0 = $queryString, !1 = $vars, !2 = $pairs, !3 = $i, !4 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%26'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        ASSIGN                                                   !2, <array>
    6     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->21
    7     9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%3D'
         11        FETCH_DIM_R                                      ~9      !1, !3
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !4, $10
    8    15        FETCH_DIM_R                                      ~13     !4, 0
         16        FETCH_DIM_R                                      ~14     !4, 1
         17        INIT_ARRAY                                       ~15     ~14, ~13
         18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  ~15
    6    20        PRE_INC                                                  !3
         21    >   COUNT                                            ~17     !1
         22        IS_SMALLER                                               !3, ~17
         23      > JMPNZ                                                    ~18, ->9
   10    24    > > RETURN                                                   !2
   11    25*     > RETURN                                                   null

End of function getqueryvariables

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.89 ms | 1004 KiB | 16 Q