3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { /** * @docblock1 */ public $x = "x", $y = 'y', /** @docblock2 */ $z = 'z' ; } $reflection = new ReflectionProperty('\X', 'x'); echo 'X::x', PHP_EOL; var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'y'); echo 'X::y', PHP_EOL; var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'z'); echo 'X::z', PHP_EOL; var_dump($reflection->getDocComment());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b4Jaq
function name:  (null)
number of ops:  37
compiled vars:  !0 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'ReflectionProperty'
          1        SEND_VAL_EX                                              '%5CX'
          2        SEND_VAL_EX                                              'x'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   16     5        ECHO                                                     'X%3A%3Ax'
          6        ECHO                                                     '%0A'
   17     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'getDocComment'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   19    12        NEW                                              $6      'ReflectionProperty'
         13        SEND_VAL_EX                                              '%5CX'
         14        SEND_VAL_EX                                              'y'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !0, $6
   20    17        ECHO                                                     'X%3A%3Ay'
         18        ECHO                                                     '%0A'
   21    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !0, 'getDocComment'
         21        DO_FCALL                                      0  $9      
         22        SEND_VAR                                                 $9
         23        DO_ICALL                                                 
   23    24        NEW                                              $11     'ReflectionProperty'
         25        SEND_VAL_EX                                              '%5CX'
         26        SEND_VAL_EX                                              'z'
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !0, $11
   24    29        ECHO                                                     'X%3A%3Az'
         30        ECHO                                                     '%0A'
   25    31        INIT_FCALL                                               'var_dump'
         32        INIT_METHOD_CALL                                         !0, 'getDocComment'
         33        DO_FCALL                                      0  $14     
         34        SEND_VAR                                                 $14
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.37 ms | 1396 KiB | 15 Q