3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public function __get($name) { return 4; } public function __set($name,$val) {} } $t = new T(); $p = $t->h = 5; var_dump($p);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bj8Yi
function name:  (null)
number of ops:  10
compiled vars:  !0 = $t, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'T'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        ASSIGN_OBJ                                       ~5      !0, 'h'
          4        OP_DATA                                                  5
          5        ASSIGN                                                   !1, ~5
   18     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class T:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bj8Yi
function name:  __get
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   4
    8     2*     > 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/Bj8Yi
function name:  __set
number of ops:  3
compiled vars:  !0 = $name, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2      > RETURN                                                   null

End of function __set

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.88 ms | 1395 KiB | 15 Q