3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __set($property, $value) { $this->$property = $value; } public function __get($property){ return $this->$property; } } $user = new User; var_dump($user->fname = 'Alejandro'); var_dump($user->fname);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u6Y5R
function name:  (null)
number of ops:  13
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        ASSIGN_OBJ                                       ~4      !0, 'fname'
          5        OP_DATA                                                  'Alejandro'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   19     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~6      !0, 'fname'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u6Y5R
function name:  __get
number of ops:  4
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

End of function __get

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156 ms | 1395 KiB | 15 Q