3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { public $property; } class Bar { use Foo; public $anotherProperty; } foreach ((new ReflectionClass(Bar::class))->getProperties() as $property) { var_dump($property->name); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/2vXBr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   12     1        NEW                                              $1      'ReflectionClass'
          2        SEND_VAL_EX                                              'Bar'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $1, 'getProperties'
          5        DO_FCALL                                      0  $3      
          6      > FE_RESET_R                                       $4      $3, ->13
          7    > > FE_FETCH_R                                               $4, !0, ->13
   13     8    >   INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~5      !0, 'name'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   12    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $4
   14    14      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.45 ms | 1394 KiB | 15 Q