3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private int $foo = 123; private array $bar = ['a' => 'b']; public function & __get(string $name) { return $this->$name; } } $foo = new Foo; var_dump($foo); $foo->foo = 456; $foo->bar['c'] = 'd'; var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dn1cQ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   17     6        ASSIGN_OBJ                                               !0, 'foo'
          7        OP_DATA                                                  456
   18     8        FETCH_OBJ_W                                      $6      !0, 'bar'
          9        ASSIGN_DIM                                               $6, 'c'
         10        OP_DATA                                                  'd'
   20    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Foo:
Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/dn1cQ
function name:  __get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      !0
          2      > RETURN_BY_REF                                            $1
   10     3*     > RETURN_BY_REF                                            null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
203.09 ms | 999 KiB | 14 Q