3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class UserModel { protected $userName; protected $userPassword; public function setName($name) { $this->userName = $name; return $this; } public function setPassword($password) { $this->userPassword = UserModel::hashPassword($password); return $this; } public static function hashPassword($password) { return md5('salt : ' . $password); } public function authenticate($user, $pass) { return ($this->userName === $user && $this->userPassword === UserModel::hashPassword($pass));
Output for 5.4.0 - 5.5.3
Parse error: syntax error, unexpected end of file in /in/uF0af on line 23
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/uF0af on line 23
Process exited with code 255.