Code: Select all
lass example_class_name
{
public $attribute;
function operation ($param)
{
$this -> attribute = $param
echo this ->attribute;
}As far as I understands.. class example_class_name creates a new class called example_class_name
But What does public $attribute do???
Would $attribute be a variable in this case?
"operation" is a function we've just created and it has a parameter called $param correct??
I don't really understand $this -> attribute =$param
Isn't $param a parameter of the function operation?
It'd be great if someone could explain to me what each line of this simple php script do