3v4l.org

run code in 500+ PHP versions simultaneously
<?php $o = new stdClass; $o->text = "ans1"; $o2 = new stdClass; $o2->text = "ans2"; $o3 = new stdClass; $o3->text = "ans3"; $arr = [$o, $o2, $o3]; $arr = array_column($arr, 'text'); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6PChU
function name:  (null)
number of ops:  28
compiled vars:  !0 = $o, !1 = $o2, !2 = $o3, !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, 'text'
          4        OP_DATA                                                      'ans1'
    6     5        NEW                                                  $8      'stdClass'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $8
    7     8        ASSIGN_OBJ                                                   !1, 'text'
          9        OP_DATA                                                      'ans2'
    9    10        NEW                                                  $12     'stdClass'
         11        DO_FCALL                                          0          
         12        ASSIGN                                                       !2, $12
   10    13        ASSIGN_OBJ                                                   !2, 'text'
         14        OP_DATA                                                      'ans3'
   13    15        INIT_ARRAY                                           ~16     !0
         16        ADD_ARRAY_ELEMENT                                    ~16     !1
         17        ADD_ARRAY_ELEMENT                                    ~16     !2
         18        ASSIGN                                                       !3, ~16
   15    19        INIT_FCALL                                                   'array_column'
         20        SEND_VAR                                                     !3
         21        SEND_VAL                                                     'text'
         22        DO_ICALL                                             $18     
         23        ASSIGN                                                       !3, $18
   17    24        INIT_FCALL                                                   'print_r'
         25        SEND_VAR                                                     !3
         26        DO_ICALL                                                     
         27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.72 ms | 2895 KiB | 15 Q