3v4l.org

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

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mt6ba
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'foo'
          1        OP_DATA                                                  'bar'
    6     2      > RETURN                                                   null

End of function a

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.27 ms | 1396 KiB | 15 Q