3v4l.org

run code in 300+ PHP versions simultaneously
<?php $adjuntos = array('idAdjunto' => 1, 'tamano' => 'x'); array_walk($adjuntos, function($value, &$key){ $key = 'ADJUNTO_' . $key; }); var_dump($adjuntos); 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/rM9nd
function name:  (null)
number of ops:  29
compiled vars:  !0 = $adjuntos, !1 = $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%2FrM9nd%3A5%240'
    7     4        SEND_VAL                                                 ~3
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9      > EXIT                                                     
   12    10*       INIT_FCALL                                               'var_dump'
         11*       INIT_FCALL                                               'array_shift'
         12*       SEND_REF                                                 !0
         13*       DO_ICALL                                         $6      
         14*       SEND_VAR                                                 $6
         15*       DO_ICALL                                                 
   13    16*       EXIT                                                     
   15    17*       INIT_FCALL                                               'array_filter'
         18*       SEND_VAR                                                 !0
         19*       DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrM9nd%3A15%241'
   17    20*       SEND_VAL                                                 ~8
         21*       DO_ICALL                                         $9      
   15    22*       ASSIGN                                                   !1, $9
   18    23*       INIT_FCALL                                               'var_dump'
         24*       JMPNZ_EX                                         ~11     !1, ->26
         25*       BOOL                                             ~11     <false>
         26*       SEND_VAL                                                 ~11
         27*       DO_ICALL                                                 
         28*     > RETURN                                                   1

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

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

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

End of function %00%7Bclosure%7D%2Fin%2FrM9nd%3A15%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.56 ms | 1400 KiB | 21 Q