3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { } class Profile { public function __construct(User $user) { $this->user = $user; } } $user1 = new User; $prof1 = new Profile($user1); $user2 = new User; $prof2 = new Profile($user2); var_dump($prof1 == $prof2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P3K6j
function name:  (null)
number of ops:  19
compiled vars:  !0 = $user1, !1 = $prof1, !2 = $user2, !3 = $prof2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $4      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   19     3        NEW                                              $7      'Profile'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
   21     7        NEW                                              $10     'User'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $10
   22    10        NEW                                              $13     'Profile'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $13
   24    14        INIT_FCALL                                               'var_dump'
         15        IS_EQUAL                                         ~16     !1, !3
         16        SEND_VAL                                                 ~16
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class User: [no user functions]
Class Profile:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P3K6j
function name:  __construct
number of ops:  4
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ASSIGN_OBJ                                               'user'
          2        OP_DATA                                                  !0
   15     3      > RETURN                                                   null

End of function __construct

End of class Profile.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.36 ms | 1395 KiB | 15 Q