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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.36 ms | 1396 KiB | 17 Q