3v4l.org

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
285.21 ms | 1001 KiB | 14 Q