3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Bug { private static $foo; private static int $bar; } $rc = new ReflectionClass(Bug::class); var_dump($rc->getStaticPropertyValue('foo')); var_dump($v = $rc->getStaticPropertyValue('bar')); echo "bar = {$v}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56CNK
function name:  (null)
number of ops:  22
compiled vars:  !0 = $rc, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Bug'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getStaticPropertyValue'
          6        SEND_VAL_EX                                              'foo'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
   10    10        INIT_FCALL                                               'var_dump'
         11        INIT_METHOD_CALL                                         !0, 'getStaticPropertyValue'
         12        SEND_VAL_EX                                              'bar'
         13        DO_FCALL                                      0  $7      
         14        ASSIGN                                           ~8      !1, $7
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
   11    17        ROPE_INIT                                     3  ~11     'bar+%3D+'
         18        ROPE_ADD                                      1  ~11     ~11, !1
         19        ROPE_END                                      2  ~10     ~11, '%0A'
         20        ECHO                                                     ~10
         21      > RETURN                                                   1

Class Bug: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.73 ms | 1001 KiB | 14 Q