3v4l.org

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

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.89 ms | 1000 KiB | 14 Q