public function authenticate()



			// username => password










		return !$this->errorCode;


Can someone please explain return !$this->errorCode; to me?

I would understand if it stated return $this->errorCode; , but what does NOT do? ???

Ok, the ERROR_NONE constant equals 0, so it’s just inverting 0 (which in PHP is falsey) to true if ERROR_NONE. All the other constants there are integers equal to or greater than 1 (PHP truthy) so it inverts these to false.

Thank you. :)

So it’s essentially the same as: return true;

Not exactly… to be clear… it’s the same only if there is no errors… if there is any error then it’s the same as return false.