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); foreach ($array as $a) { $f[] = preg_split('/[=]/' , $a[0]); $f[$a[0]][] = preg_split('/[,]/' , $a[1]); } var_dump($f);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/gpI4r
function name:  (null)
number of ops:  30
compiled vars:  !0 = $str, !1 = $array, !2 = $a, !3 = $f
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                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6      > FE_RESET_R                                       $7      !1, ->25
          7    > > FE_FETCH_R                                               $7, !2, ->25
    8     8    >   INIT_FCALL                                               'preg_split'
          9        SEND_VAL                                                 '%2F%5B%3D%5D%2F'
         10        FETCH_DIM_R                                      ~9      !2, 0
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $10
    9    15        FETCH_DIM_R                                      ~11     !2, 0
         16        INIT_FCALL                                               'preg_split'
         17        SEND_VAL                                                 '%2F%5B%2C%5D%2F'
         18        FETCH_DIM_R                                      ~14     !2, 1
         19        SEND_VAL                                                 ~14
         20        DO_ICALL                                         $15     
         21        FETCH_DIM_W                                      $12     !3, ~11
         22        ASSIGN_DIM                                               $12
         23        OP_DATA                                                  $15
    6    24      > JMP                                                      ->7
         25    >   FE_FREE                                                  $7
   12    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.26 ms | 1396 KiB | 17 Q