3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { /** * @Hello() */ private $x = 5; } class C { use T; /** * @Goodbye() */ private $x = 5; } $rt = new \ReflectionProperty('T', 'x'); $rc = new \ReflectionProperty('C', 'x'); var_dump($rt->getDocComment()); var_dump($rc->getDocComment());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KY9nl
function name:  (null)
number of ops:  22
compiled vars:  !0 = $rt, !1 = $rc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'c'
   19     1        NEW                                              $2      'ReflectionProperty'
          2        SEND_VAL_EX                                              'T'
          3        SEND_VAL_EX                                              'x'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   20     6        NEW                                              $5      'ReflectionProperty'
          7        SEND_VAL_EX                                              'C'
          8        SEND_VAL_EX                                              'x'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
   22    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !0, 'getDocComment'
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
   23    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !1, 'getDocComment'
         18        DO_FCALL                                      0  $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class T: [no user functions]
Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.47 ms | 1399 KiB | 15 Q