Forum Moderators: coopster
PHP 5 expanded and changed the way object oriented code works, including allowing you to declare functions as public, private or protected. Inside classes, functions should be declared something like
public function afunctionname(){
}
private function anotherfunctionname(){
}
private function protectedfunctionname(){
} For the sake of backwards compatibility, if the public/private/protected/afewothers keyword isn't there, (as is always the case with code written for PHP 4), PHP 5 assumes the function is public.
It sounds like you have a high warning level set. You can lower this warning level to stop these messages from showing up, or you could irritate object oriented programmers everywhere and just add the word "public" in front of all your class functions.
If you want to learn what all these mean, I recommend the O'Reilly "Upgrading to PHP 5" book as a good primer.
So what happens when you put PHP5 code on a server running php4?
To suppress those class warning errors you simply need to tone down the error_reporting [php.net] level from E_STRICT to E_ALL or if you have reviewed the code in the class and are comfortable with it, turn errors off altogether for that script/class. However, and this would be my recommendation, if you are going to take the time to review the class you may as well modify the Visibility [php.net] to get rid of your errors.