3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Obj { public int $prop1 = 1; private int $prop2 = 1; } class Tester { /** * @param list<Obj> $objects */ public static function test(array $objects): void { var_dump(array_column($objects, 'prop1')); var_dump(array_column($objects, 'prop2')); } } Tester::test([new Obj]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bJYSl
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                      'Tester', 'test'
          1        NEW                                                  $0      'Obj'
          2        DO_FCALL                                          0          
          3        INIT_ARRAY                                           ~2      $0
          4        SEND_VAL                                                     ~2
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

Class Obj: [no user functions]
Class Tester:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bJYSl
function name:  test
number of ops:  16
compiled vars:  !0 = $objects
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
   17     1        INIT_FCALL                                                   'var_dump'
          2        INIT_FCALL                                                   'array_column'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     'prop1'
          5        DO_ICALL                                             $1      
          6        SEND_VAR                                                     $1
          7        DO_ICALL                                                     
   18     8        INIT_FCALL                                                   'var_dump'
          9        INIT_FCALL                                                   'array_column'
         10        SEND_VAR                                                     !0
         11        SEND_VAL                                                     'prop2'
         12        DO_ICALL                                             $3      
         13        SEND_VAR                                                     $3
         14        DO_ICALL                                                     
   19    15      > RETURN                                                       null

End of function test

End of class Tester.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.46 ms | 1454 KiB | 14 Q