3v4l.org

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

End of function __construct

End of class Profile.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.65 ms | 1385 KiB | 13 Q