3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class User { public function __set(string $name, mixed $value): void { $this->{$name} = $value; } } $user = new User(); $user->name = 'test'; echo $user->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YhvnO
function name:  (null)
number of ops:  8
compiled vars:  !0 = $user
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $1      'User'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   11     3        ASSIGN_OBJ                                                   !0, 'name'
          4        OP_DATA                                                      'test'
   13     5        FETCH_OBJ_R                                          ~5      !0, 'name'
          6        ECHO                                                         ~5
   14     7      > RETURN                                                       1

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

End of function __set

End of class User.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.87 ms | 3355 KiB | 13 Q