3v4l.org

run code in 300+ PHP versions simultaneously
<?php $adjuntos = array('idAdjunto' => 1, 'tamano' => 'x'); $arrAdjuntos = array_walk($adjuntos, function(&$item, $key){ var_dump($item); var_dump($key); //$item['ADJUNTO_' . $item[0]] = $item[1]; }); var_dump($arrAdjuntos); die; var_dump(array_shift($adjuntos)); die; $res = array_filter($adjuntos, function($item) { return $item['idAdjunto'] == 1; }); var_dump($res || false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/ftcSR
function name:  (null)
number of ops:  30
compiled vars:  !0 = $adjuntos, !1 = $arrAdjuntos, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FftcSR%3A5%240'
    9     4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
    5     6        ASSIGN                                                   !1, $5
   11     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   12    10      > EXIT                                                     
   14    11*       INIT_FCALL                                               'var_dump'
         12*       INIT_FCALL                                               'array_shift'
         13*       SEND_REF                                                 !0
         14*       DO_ICALL                                         $8      
         15*       SEND_VAR                                                 $8
         16*       DO_ICALL                                                 
   15    17*       EXIT                                                     
   17    18*       INIT_FCALL                                               'array_filter'
         19*       SEND_VAR                                                 !0
         20*       DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FftcSR%3A17%241'
   19    21*       SEND_VAL                                                 ~10
         22*       DO_ICALL                                         $11     
   17    23*       ASSIGN                                                   !2, $11
   20    24*       INIT_FCALL                                               'var_dump'
         25*       JMPNZ_EX                                         ~13     !2, ->27
         26*       BOOL                                             ~13     <false>
         27*       SEND_VAL                                                 ~13
         28*       DO_ICALL                                                 
         29*     > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FftcSR%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ftcSR
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    7     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FftcSR%3A5%240

Function %00%7Bclosure%7D%2Fin%2FftcSR%3A17%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ftcSR
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        FETCH_DIM_R                                      ~1      !0, 'idAdjunto'
          2        IS_EQUAL                                         ~2      ~1, 1
          3      > RETURN                                                   ~2
   19     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FftcSR%3A17%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.75 ms | 1400 KiB | 21 Q