3v4l.org

run code in 300+ PHP versions simultaneously
<?php $gets = array(); $string = "component/content/article?id=9&sid=15"; $parts = explode('?',$string); $parts = explode('&',$parts[1]); foreach($parts as $part){ $gets[$part[0]] = $part[1]; } print_r($gets);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/SZ49o
function name:  (null)
number of ops:  25
compiled vars:  !0 = $gets, !1 = $string, !2 = $parts, !3 = $part
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'component%2Fcontent%2Farticle%3Fid%3D9%26sid%3D15'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%3F'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    5     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%26'
          9        FETCH_DIM_R                                      ~8      !2, 1
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    6    13      > FE_RESET_R                                       $11     !2, ->20
         14    > > FE_FETCH_R                                               $11, !3, ->20
    7    15    >   FETCH_DIM_R                                      ~12     !3, 0
         16        FETCH_DIM_R                                      ~14     !3, 1
         17        ASSIGN_DIM                                               !0, ~12
         18        OP_DATA                                                  ~14
    6    19      > JMP                                                      ->14
         20    >   FE_FREE                                                  $11
    9    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.38 ms | 1387 KiB | 17 Q