I have two constructor :
function clsUsagerEmailUserName($nickName, $email) { $this->nickName = $nickName; $this->email = $email; } function clsUsagerEmailUserName($email) { $this->email = $email; }
But this is not working? What’s wrong, isn’t supposed to be OO at this version of PHP? (I just migrate from PHP4)
PHP5 doesn’t allow overloaded constructor.
Alternativly you can use function to set or you can use this trick (found at EE):