3v4l.org

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

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

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

Function %00%7Bclosure%7D%2Fin%2FRcRkZ%3A15%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RcRkZ
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%2FRcRkZ%3A15%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1400 KiB | 21 Q