3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; private function taz() { return 'waz'; } } var_dump((new ReflectionProperty(Foo::class, 'bar'))->getValue(new Foo)); var_dump((new ReflectionMethod(Foo::class, 'taz'))->invoke(new Foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNeeZ
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'ReflectionProperty'
          2        SEND_VAL_EX                                                  'Foo'
          3        SEND_VAL_EX                                                  'bar'
          4        DO_FCALL                                          0          
          5        INIT_METHOD_CALL                                             $0, 'getValue'
          6        NEW                                                  $2      'Foo'
          7        DO_FCALL                                          0          
          8        SEND_VAR_NO_REF_EX                                           $2
          9        DO_FCALL                                          0  $4      
         10        SEND_VAR                                                     $4
         11        DO_ICALL                                                     
    9    12        INIT_FCALL                                                   'var_dump'
         13        NEW                                                  $6      'ReflectionMethod'
         14        SEND_VAL_EX                                                  'Foo'
         15        SEND_VAL_EX                                                  'taz'
         16        DO_FCALL                                          0          
         17        INIT_METHOD_CALL                                             $6, 'invoke'
         18        NEW                                                  $8      'Foo'
         19        DO_FCALL                                          0          
         20        SEND_VAR_NO_REF_EX                                           $8
         21        DO_FCALL                                          0  $10     
         22        SEND_VAR                                                     $10
         23        DO_ICALL                                                     
         24      > RETURN                                                       1

Class Foo:
Function taz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNeeZ
function name:  taz
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                       'waz'
          1*     > RETURN                                                       null

End of function taz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.39 ms | 1720 KiB | 14 Q