3v4l.org

run code in 300+ PHP versions simultaneously
<?php class sample{ public $sam = 'hello'; public function __get($varname){ echo 'you cant access '.$varname; } public function __set($varname,$value){ echo 'there is no variable with name '.$varname; } } $s = new sample; echo $s->sam; $s->sam = 'fasdf';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f9Pan
function name:  (null)
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'sample'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        FETCH_OBJ_R                                      ~4      !0, 'sam'
          4        ECHO                                                     ~4
   13     5        ASSIGN_OBJ                                               !0, 'sam'
          6        OP_DATA                                                  'fasdf'
          7      > RETURN                                                   1

Class sample:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f9Pan
function name:  __get
number of ops:  4
compiled vars:  !0 = $varname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        CONCAT                                           ~1      'you+cant+access+', !0
          2        ECHO                                                     ~1
    6     3      > 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/f9Pan
function name:  __set
number of ops:  5
compiled vars:  !0 = $varname, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        CONCAT                                           ~2      'there+is+no+variable+with+name+', !0
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function __set

End of class sample.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.03 ms | 1394 KiB | 13 Q