Tuesday, June 23, 2009

PHP - from bad to worse

Everyone who has ever programmed something in PHP knows that it a) is easy to learn in the beginning and b) will produce totally unmaintainable code in the end. The problem with PHP is that it encourages bad programming patterns. Mixing logic and HTML code is a common practice among many web developers. The lack of debugging and testing tools in combination with constructs such as $$var, global variables and arrays of arrays of arrays make bugfixing extremely painful.

Unfortunately these "features" are also the reason why PHP is so popular among beginners. They might be useful for tools and scripts but they are deadly for larger applications.

The PHP folks decided to add yet another feature that makes coding easier and maintaining harder: the GOTO statement! The evil keyword has finally arrived!

No comments: