3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = new stdClass; $a->{'abc@gmail.com'} = []; $b = new stdClass; $b->{'xyz@gmail.com'} = []; $c = [$a, $b]; $arr = array_reduce($c, function ($arr, $obj) { return array_merge($arr, array_keys(get_object_vars($obj))); }, []); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IU3C9
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $4      'stdClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $4
    4     3        ASSIGN_OBJ                                                   !0, 'abc%40gmail.com'
          4        OP_DATA                                                      <array>
    6     5        NEW                                                  $8      'stdClass'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $8
    7     8        ASSIGN_OBJ                                                   !1, 'xyz%40gmail.com'
          9        OP_DATA                                                      <array>
    9    10        INIT_ARRAY                                           ~12     !0
         11        ADD_ARRAY_ELEMENT                                    ~12     !1
         12        ASSIGN                                                       !2, ~12
   11    13        INIT_FCALL                                                   'array_reduce'
         14        SEND_VAR                                                     !2
         15        DECLARE_LAMBDA_FUNCTION                              ~14     [0]
   13    16        SEND_VAL                                                     ~14
         17        SEND_VAL                                                     <array>
   11    18        DO_ICALL                                             $15     
         19        ASSIGN                                                       !3, $15
   15    20        INIT_FCALL                                                   'var_dump'
         21        SEND_VAR                                                     !3
         22        DO_ICALL                                                     
         23      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IU3C9
function name:  {closure:/in/IU3C9:11}
number of ops:  14
compiled vars:  !0 = $arr, !1 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   12     2        INIT_FCALL                                                   'array_merge'
          3        SEND_VAR                                                     !0
          4        INIT_FCALL                                                   'array_keys'
          5        INIT_FCALL                                                   'get_object_vars'
          6        SEND_VAR                                                     !1
          7        DO_ICALL                                             $2      
          8        SEND_VAR                                                     $2
          9        DO_ICALL                                             $3      
         10        SEND_VAR                                                     $3
         11        DO_ICALL                                             $4      
         12      > RETURN                                                       $4
   13    13*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.12 ms | 2110 KiB | 18 Q