Hi, folks. Looking for some help with what is probably very simple to solve, but it has me baffled. I took a piece of code home from work and tried to run it, but it gave me a parse error when it encountered its first property declaration within a class. There were some other things going on in the code, too, so to simplify it, wrote this test page, and sure enough, it does not want to encounter variablers inside a class definition, outside of a function. Is there a flag I need to throw in my php configuration? Any thoughts would be appreciated. Here's the code:
<?
class Testpage {
static protected message;
function __construct() {
}
function printpage() {
$message = "Does this work?";
print("$message");
}
}
$page = new Testpage;
$page->printpage();
?>
And it produces:
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE in /var/www/testpage.php on line 4
Thanks!