3v4l.org

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

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

End of function %00%7Bclosure%7D%2Fin%2Fa0N5l%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1395 KiB | 17 Q