When reading a few php class tutorials, I noticed every now and then "public" prefixed before "function", but what does that mean? Are those functions (that are stated as public) available to anyone using the class? If so, should I prefix all my functions as public?
Is there a way to make a function private in a class so only the class functions can call it?
I read in other tutorials about initiating your variables like this.
class test
{
var $var1;
var $var2;
var $var3;
}
But why can't you just initiate the variables you normally would when using PHP. Like this.
$test = "testing...";