3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $username; public function __construct(string $username) { $this->username = $username; } } $users = [ new User('user 1'), new User('user 2'), new User('user 3'), ]; print_r(array_column($users, 'username'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YG4rM
function name:  (null)
number of ops:  21
compiled vars:  !0 = $users
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'User'
          1        SEND_VAL_EX                                              'user+1'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~3      $1
   15     4        NEW                                              $4      'User'
          5        SEND_VAL_EX                                              'user+2'
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~3      $4
   16     8        NEW                                              $6      'User'
          9        SEND_VAL_EX                                              'user+3'
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~3      $6
   13    12        ASSIGN                                                   !0, ~3
   19    13        INIT_FCALL                                               'print_r'
         14        INIT_FCALL                                               'array_column'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'username'
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Class User:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YG4rM
function name:  __construct
number of ops:  4
compiled vars:  !0 = $username
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'username'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function __construct

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.88 ms | 1395 KiB | 17 Q