Oh my T_CASE!
onA little explanation. Does anyone out there program in PHP? If you do (woohoo!), you may have experienced a:
Parse error: syntax error, unexpected T_CASE in /path/to/file on line 7
Or perhaps, maybe a:
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in /path/to/file on line 12
Or maybe even a:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /path/to/file on line 12
No need to panic. Well, I guess I did the first time I saw one of them. But it turns out that, while it is hard to find information about them on the internet, the solution for them is quite simple.
They just mean that you're using bad syntax. For instance, the
T_CASE
may mean that you have aswitch
statement somewhere and forgot a;
after thebreak
. TheT_ECHO
could mean that you forgot a;
after anecho
statement. And the what-on-earthT_CONSTANT_ENCAPSED_STRING
just means that you left out a[
's matching]
.That feel better? I knew it would.
Sorry, I'm just really random sometimes, but it WAS difficult to find information about these errors on the internet.
Comments