3v4l.org

run code in 300+ PHP versions simultaneously
<?php class zOMG { public function __get($name) { return isset($this->$name) ? $this->$name : new self; } 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/cZhYs
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'zOMG'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        FETCH_OBJ_W                                      $4      !0, 'a'
          4        ASSIGN_OBJ                                               $4, 'b'
          5        OP_DATA                                                  1
   17     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 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZhYs
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                                   !0
          2      > JMPZ                                                     ~1, ->6
          3    >   FETCH_OBJ_R                                      ~2      !0
          4        QM_ASSIGN                                        ~3      ~2
          5      > JMP                                                      ->9
          6    >   NEW                          self                $4      
          7        DO_FCALL                                      0          
          8        QM_ASSIGN                                        ~3      $4
          9    > > RETURN                                                   ~3
    8    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/cZhYs
function name:  __set
number of ops:  5
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
   12     4      > RETURN                                                   null

End of function __set

End of class zOMG.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.19 ms | 1388 KiB | 15 Q