3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ["/?dfs1=frgs1","/?dfs2=frgs2","/?dfs3=frgs3"]; $matches = preg_grep("/\/\?(.*)\=(.*)/", $a); $fmatchs = []; foreach($matches as $match){ $mtchs = explode("=", $match); print($match); //print_r($mtchs); foreach($mtchs as $v){ echo "dddd".$v[0]; print_r($v); $k = str_replace("/?", "", $v[0]); $fmatchs[$k] = $v[1]; } } print_r($fmatchs);
based on OL9M3
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 8, Position 2 = 36
Branch analysis from position: 8
Jump found. Position 1 = 9, Position 2 = 36
Branch analysis from position: 9
Jump found. Position 1 = 16, Position 2 = 34
Branch analysis from position: 16
Jump found. Position 1 = 17, Position 2 = 34
Branch analysis from position: 17
Jump found. Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 34
Jump found. Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 34
Branch analysis from position: 36
Jump found. Position 1 = -2
Branch analysis from position: 36
filename:       /in/89nu1
function name:  (null)
number of ops:  41
compiled vars:  !0 = $a, !1 = $matches, !2 = $fmatchs, !3 = $match, !4 = $mtchs, !5 = $v, !6 = $k
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, <array>
   3     1        INIT_FCALL                                               'preg_grep'
         2        SEND_VAL                                                 '%2F%5C%2F%5C%3F%28.%2A%29%5C%3D%28.%2A%29%2F'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $8      
         5        ASSIGN                                                   !1, $8
   4     6        ASSIGN                                                   !2, <array>
   5     7      > FE_RESET_R                                       $11     !1, ->36
         8    > > FE_FETCH_R                                               $11, !3, ->36
   6     9    >   INIT_FCALL                                               'explode'
        10        SEND_VAL                                                 '%3D'
        11        SEND_VAR                                                 !3
        12        DO_ICALL                                         $12     
        13        ASSIGN                                                   !4, $12
   7    14        ECHO                                                     !3
   9    15      > FE_RESET_R                                       $14     !4, ->34
        16    > > FE_FETCH_R                                               $14, !5, ->34
  10    17    >   FETCH_DIM_R                                      $15     !5, 0
        18        CONCAT                                           ~16     'dddd', $15
        19        ECHO                                                     ~16
  11    20        INIT_FCALL                                               'print_r'
        21        SEND_VAR                                                 !5
        22        DO_ICALL                                                 
  12    23        INIT_FCALL                                               'str_replace'
        24        SEND_VAL                                                 '%2F%3F'
        25        SEND_VAL                                                 ''
        26        FETCH_DIM_R                                      $18     !5, 0
        27        SEND_VAR                                                 $18
        28        DO_ICALL                                         $19     
        29        ASSIGN                                                   !6, $19
  13    30        FETCH_DIM_R                                      $22     !5, 1
        31        ASSIGN_DIM                                               !2, !6
        32        OP_DATA                                                  $22
        33      > JMP                                                      ->16
        34    >   FE_FREE                                                  $14
        35      > JMP                                                      ->8
        36    >   FE_FREE                                                  $11
  16    37        INIT_FCALL                                               'print_r'
        38        SEND_VAR                                                 !2
        39        DO_ICALL                                                 
        40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0