3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TraitWithProperties { private $a = 'foo'; protected $b = 'bar'; public $c = 'baz'; private static $as = self::class; protected static $bs = __TRAIT__; public static $cs = __CLASS__; } class SimpleClassWithTrait { use TraitWithProperties; } $refClass = new ReflectionClass('TraitWithProperties'); var_dump($refClass->getStaticProperties());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RqhFX
function name:  (null)
number of ops:  11
compiled vars:  !0 = $refClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'simpleclasswithtrait'
   19     1        NEW                                              $1      'ReflectionClass'
          2        SEND_VAL_EX                                              'TraitWithProperties'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   20     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'getStaticProperties'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class TraitWithProperties: [no user functions]
Class SimpleClassWithTrait: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.03 ms | 1394 KiB | 15 Q