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/OJZNE
function name:  (null)
number of ops:  23
compiled vars:  !0 = $organizations, !1 = $organizationIds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_CONSTANT                                   ~2      'id'
          1        INIT_ARRAY                                       ~3      1, ~2
          2        CAST                                          8  ~4      ~3
          3        INIT_ARRAY                                       ~5      ~4
    8     4        FETCH_CONSTANT                                   ~6      'id'
          5        INIT_ARRAY                                       ~7      2, ~6
          6        CAST                                          8  ~8      ~7
          7        ADD_ARRAY_ELEMENT                                ~5      ~8
   11     8        FETCH_CONSTANT                                   ~9      'id'
          9        INIT_ARRAY                                       ~10     3, ~9
         10        CAST                                          8  ~11     ~10
         11        ADD_ARRAY_ELEMENT                                ~5      ~11
    3    12        ASSIGN                                                   !0, ~5
   15    13        INIT_FCALL                                               'array_map'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOJZNE%3A15%240'
   17    15        SEND_VAL                                                 ~13
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $14     
   15    18        ASSIGN                                                   !1, $14
   19    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.95 ms | 1388 KiB | 17 Q