3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public $baz = 1; } $obj = new Foo(); unset($obj->baz); $obj->quux = 2; 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/IbGg8
function name:  (null)
number of ops:  28
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'
    8     4        ASSIGN_OBJ                                               !0, 'quux'
          5        OP_DATA                                                  2
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   12     9        NEW                                              $8      'ReflectionClass'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $8
   13    13        INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !1, 'getProperties'
         15        DO_FCALL                                      0  $11     
         16        SEND_VAR                                                 $11
         17        DO_ICALL                                                 
   15    18        NEW                                              $13     'ReflectionObject'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !2, $13
   16    22        INIT_FCALL                                               'var_dump'
         23        INIT_METHOD_CALL                                         !2, 'getProperties'
         24        DO_FCALL                                      0  $16     
         25        SEND_VAR                                                 $16
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.34 ms | 1000 KiB | 14 Q