3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ (object) ['id' => 1, 'name' => 'hovno'], (object) ['id' => 2, 'name' => 'piča'], ]; array_walk($array, function($item) { return $item->id; }); var_dump($array); echo implode(',', $array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eZcE3
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~1      <array>
          1        INIT_ARRAY                                       ~2      ~1
    5     2        CAST                                          8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                ~2      ~3
    3     4        ASSIGN                                                   !0, ~2
    9     5        INIT_FCALL                                               'array_walk'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeZcE3%3A9%240'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
   11    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   13    13        INIT_FCALL                                               'implode'
         14        SEND_VAL                                                 '%2C'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $8      
         17        ECHO                                                     $8
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FeZcE3%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eZcE3
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      !0, 'id'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FeZcE3%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.84 ms | 1395 KiB | 19 Q