3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { } class Bar { public static $baz = 'baz'; protected static $bat = 'bat'; private static $qux = 'qux'; } $bar = new ReflectionClass(Bar::class); var_dump($bar->getStaticPropertyValue('baz')); var_dump($bar->getStaticPropertyValue('bat')); var_dump($bar->getStaticPropertyValue('qux'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdAlu
function name:  (null)
number of ops:  23
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getStaticPropertyValue'
          6        SEND_VAL_EX                                              'baz'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   16    10        INIT_FCALL                                               'var_dump'
         11        INIT_METHOD_CALL                                         !0, 'getStaticPropertyValue'
         12        SEND_VAL_EX                                              'bat'
         13        DO_FCALL                                      0  $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
   17    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !0, 'getStaticPropertyValue'
         18        SEND_VAL_EX                                              'qux'
         19        DO_FCALL                                      0  $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
211.03 ms | 1395 KiB | 15 Q