3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bonusProgramShops = array( 1 => array( 'name' => 'test1', ), 2 => array( 'name' => 'test2', ), ); $customerOnShops = array(1); array_walk( $bonusProgramShops, function( &$shop, $shopId ) use ( $customerOnShops ) { if ( ! in_array( $shopId, $customerOnShops ) ) { return; } $shop['sameple'] = 'testing'; } ); var_dump( $bonusProgramShops );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8f81a
function name:  (null)
number of ops:  12
compiled vars:  !0 = $bonusProgramShops, !1 = $customerOnShops
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8f81a%3A13%240'
          5        BIND_LEXICAL                                             ~4, !1
   21     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   23     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F8f81a%3A13%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8f81a
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $shop, !1 = $shopId, !2 = $customerOnShops
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   15     3        INIT_FCALL                                               'in_array'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $3      
          7        BOOL_NOT                                         ~4      $3
          8      > JMPZ                                                     ~4, ->10
   17     9    > > RETURN                                                   null
   20    10    >   ASSIGN_DIM                                               !0, 'sameple'
         11        OP_DATA                                                  'testing'
   21    12      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8f81a%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.69 ms | 941 KiB | 20 Q