3v4l.org

run code in 300+ PHP versions simultaneously
<?php $adjuntos = array('idAdjunto' => 1, 'tamano' => 'x'); $arrAdjuntos = array_walk($adjuntos, function(&$item){ $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/rBl4A
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%2FrBl4A%3A5%240'
    7     4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
    5     6        ASSIGN                                                   !1, $5
    9     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   10    10      > EXIT                                                     
   12    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                                                 
   13    17*       EXIT                                                     
   15    18*       INIT_FCALL                                               'array_filter'
         19*       SEND_VAR                                                 !0
         20*       DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrBl4A%3A15%241'
   17    21*       SEND_VAL                                                 ~10
         22*       DO_ICALL                                         $11     
   15    23*       ASSIGN                                                   !2, $11
   18    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%2FrBl4A%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rBl4A
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_DIM_R                                      ~1      !0, 0
          2        CONCAT                                           ~2      'ADJUNTO_', ~1
          3        FETCH_DIM_R                                      ~4      !0, 1
          4        ASSIGN_DIM                                               !0, ~2
          5        OP_DATA                                                  ~4
    7     6      > RETURN                                                   null

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.27 ms | 1392 KiB | 21 Q