Shiroyuki Shiroyuki - 2 months ago 8
PHP Question

How to get a static function into a non static funtion?

Well Hello,
my problem is that i get this message when i register my account. (It works but that little message is a abit ugly.)
I'm not really familar with static and non static so I'd like to ask how to get this

$password = Password::encode($password);
(line 76)
into a non static version.
Thank you


This warning what you got means that encode is not a static method. It should be called more like this:

$pass = new Password();
$password = $pass->encode($password);

Static function looks like follows:

private static function encode($pass) { 

Non static looks like this:

private function encode($pass) { 

More informations can be found here