PHP coding is fun

I spent most of this evening trying to figure out why a particular PHP script was reporting obscure errors. I kid you not - I spent at least 2 hours modifying, uploading and modifying again, inserting echo statements etc.. all in aid of tracking down a strange parsing bug. I found out what it was in the end and I could have kicked myself when I found out what it was. I had:

#include “test.inc”

when it should have been:

#include “test.inc”;

Can you spot the difference? Cunning eh?

It’s amazing. Rather than tell me there was a problem with this line it reported strange errors to do with variable declarations and turned out to be a bitch to find. Of course, what this really boils down to is that I really depend on the compiler to catch stupid syntax errors for me and when I don’t have a compiler such as in this situation I get stupid errors.

You live and learn.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

 
The game goes here
The game goes here