3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myarray = Array ( Array ( 'user_id' => 21, 'email' => 'momod@modara.com', 'brand' => Array ('GOFUEL_W','GOFUEL_USD_W')), Array ( 'user_id' => 22, 'email' => 'hemisphere@modara.com', 'brand' => Array ('GOFUEL_W')), Array ( 'user_id' => 23, 'email' => 'madoka@modara.com', 'brand' => Array ('GOFUEL_W','GOFUEL_USD_W','GOFUEL_BGD_W') ) ); $myarray = array_filter($myarray, function(&$ar) { if($ar['user_id'] == 22) $ar['brand'][] = "GO_FUEL_SGD_W"; return true; }); print_r($myarray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUgtU
function name:  (null)
number of ops:  11
compiled vars:  !0 = $myarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNUgtU%3A16%240'
   19     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
   16     6        ASSIGN                                                   !0, $3
   21     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNUgtU%3A16%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/NUgtU
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        FETCH_DIM_R                                      ~1      !0, 'user_id'
          2        IS_EQUAL                                                 ~1, 22
          3      > JMPZ                                                     ~2, ->7
          4    >   FETCH_DIM_W                                      $3      !0, 'brand'
          5        ASSIGN_DIM                                               $3
          6        OP_DATA                                                  'GO_FUEL_SGD_W'
   18     7    > > RETURN                                                   <true>
   19     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNUgtU%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.68 ms | 1395 KiB | 17 Q