3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'prijs=0,209&orderby=price&order=undefined&posts_per_page=undefined'; $array = preg_split('/[&]/' , $str); $filters = array(); foreach ($array as $a) { $key = preg_split('/[=]/' , $a); $filters[$key[0]][] = preg_split('/[,]/' , $key[1]); } var_dump($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/rl5U0
function name:  (null)
number of ops:  29
compiled vars:  !0 = $str, !1 = $array, !2 = $filters, !3 = $a, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'prijs%3D0%2C209%26orderby%3Dprice%26order%3Dundefined%26posts_per_page%3Dundefined'
    4     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%5B%26%5D%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        ASSIGN                                                   !2, <array>
    7     7      > FE_RESET_R                                       $9      !1, ->24
          8    > > FE_FETCH_R                                               $9, !3, ->24
    9     9    >   INIT_FCALL                                               'preg_split'
         10        SEND_VAL                                                 '%2F%5B%3D%5D%2F'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !4, $10
   10    14        FETCH_DIM_R                                      ~12     !4, 0
         15        INIT_FCALL                                               'preg_split'
         16        SEND_VAL                                                 '%2F%5B%2C%5D%2F'
         17        FETCH_DIM_R                                      ~15     !4, 1
         18        SEND_VAL                                                 ~15
         19        DO_ICALL                                         $16     
         20        FETCH_DIM_W                                      $13     !2, ~12
         21        ASSIGN_DIM                                               $13
         22        OP_DATA                                                  $16
    7    23      > JMP                                                      ->8
         24    >   FE_FREE                                                  $9
   13    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.54 ms | 1396 KiB | 17 Q