3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.71 ms | 1395 KiB | 17 Q