Can't declare even the most simple class in PHP - Am I going insane?
Posted
by Phil
on Stack Overflow
See other posts from Stack Overflow
or by Phil
Published on 2010-04-13T21:12:58Z
Indexed on
2010/04/13
21:33 UTC
Read the original article
Hit count: 339
I'm getting this error whenever I attempt to declare a class:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or
T_FUNCTION or T_VAR or '}' in /home3/foundloc/public_html/booka/page2.php
on line 7 (line 7 is the class declaration by the way).
Here's the incredibly simple class I am attempting to declare:
Class abc
{
$a = “Hello!”;
}
Is there some setting on PHP that i need to turn on? I feel like this is one of those 'did you check if the TV is plugged in' type of issues....
© Stack Overflow or respective owner