3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $b = new stdClass; $a->name = 'A'; $b->name = 'B'; $foos = [$a, $b]; var_dump(array_column($foos, 'name'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gp0Y1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $foos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
    6     6        ASSIGN_OBJ                                               !0, 'name'
          7        OP_DATA                                                  'A'
    7     8        ASSIGN_OBJ                                               !1, 'name'
          9        OP_DATA                                                  'B'
    9    10        INIT_ARRAY                                       ~11     !0
         11        ADD_ARRAY_ELEMENT                                ~11     !1
         12        ASSIGN                                                   !2, ~11
   11    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'array_column'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 'name'
         17        DO_ICALL                                         $13     
         18        SEND_VAR                                                 $13
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.05 ms | 1399 KiB | 17 Q