I have a class like
class blah extends blahblah{
private $variable = '5';
function somefunction(){
echo $variable;
}
}
this works in php 5, but not in php 4. I get a error:
Parse error: parse error, unexpected
T_VARIABLE, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VA....
I also tried with public
and static
. Same error.
How can I add a variable inside that class that I can access from all class functions?