[Rant] Make your PHP portable!

Tonight I downloaded a program that is supposed to generate the backend of an application for me, doing the drudge work so I can concentrate on the custom bits.

I know what I’m doing, but it still took me 15min to get it running, and when it did what did I see? php short tags.

For folk that aren’t programmers, short tags are <? ?> instead of <?php ?> – you can set your server to accept them, but that’s the rub. If your server settings aren’t set that way the program won’t run-you actually see the php code!

A primary principle of designing for others is that you make your code portable. That means you stick to the strict settings you know will work across servers.

As you might have guessed, I won’t be using this program after all. Firstly, I’m not going to take the time to add full tags in, and second, if the programmer thought that was acceptable, what other shortcuts did they take?

Add Your Comment