3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public int $uid; public function __construct(int $uid) { $this->uid = $uid; } } $user = new User(42); $user->__construct(43); echo $user->uid;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rgPQm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'User'
          1        SEND_VAL_EX                                              42
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        INIT_METHOD_CALL                                         !0, '__construct'
          5        SEND_VAL_EX                                              43
          6        DO_FCALL                                      0          
   14     7        FETCH_OBJ_R                                      ~5      !0, 'uid'
          8        ECHO                                                     ~5
   15     9      > RETURN                                                   1

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

End of function __construct

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.79 ms | 1432 KiB | 13 Q