3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Person{ public $user; public $userid; public function __construct($username,$userid){ $this->user = $username; $this->userid = $userid; echo "Username is {$this->user} and user id is{$this->userid}"; } public function __destruct(){ } } $user = "mamun"; $id = "25"; $ur = new UserData($user, $id); ?>
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Class 'UserData' not found in /in/milUU:20 Stack trace: #0 {main} thrown in /in/milUU on line 20
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Class undefined: UserData in /in/milUU:20 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Class 'UserData' not found in /in/milUU on line 20
Process exited with code 255.