3v4l.org

run code in 300+ PHP versions simultaneously
<?php class zOMG { public function __get($name) { if (!isset($this->$name)) { $this->$name = new self; } return $this->$name; } public function __set($name, $value) { $this->$name = $value; } } $foo = new zOMG(); $foo->a->b = 1; var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MtNt3
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'zOMG'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        FETCH_OBJ_W                                      $4      !0, 'a'
          4        ASSIGN_OBJ                                               $4, 'b'
          5        OP_DATA                                                  1
   20     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class zOMG:
Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/MtNt3
function name:  __get
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ISSET_ISEMPTY_PROP_OBJ                           ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
    8     4    >   NEW                          self                $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_OBJ                                               !0
          7        OP_DATA                                                  $4
   10     8    >   FETCH_OBJ_R                                      ~6      !0
          9      > RETURN                                                   ~6
   11    10*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MtNt3
function name:  __set
number of ops:  5
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
   15     4      > RETURN                                                   null

End of function __set

End of class zOMG.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.82 ms | 1396 KiB | 15 Q