3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class User() { } class Profile(User $user) { $this->user = $user; } $user1 = new User; $prof1 = new Profile($user1); $user2 = new User; $prof2 = new Profile($user2); var_dump($profile1 == $user2);
Output for 5.3.0 - 5.4.30
Parse error: syntax error, unexpected '(', expecting '{' in /in/Ej7ns on line 5
Process exited with code 255.