3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $profile; } class Profile { public function __construct(User $user) { $this->user = $user; $user->profile = $this; } } $user1 = new User; $prof1 = new Profile($user1); $user2 = new User; $prof2 = new Profile($user2); var_dump($prof1 == $prof2);

preferences:
37.76 ms | 402 KiB | 5 Q