I’m a .Net developer by profession. So it’s only natural that I hate PHP. OK, I don’t hate it, but I find it quite frustrating. I think that the reason that this is, is because they are just so different. They take a completely different approach to accomplishing the same thing. So when I go to program something in PHP, which I don’t do that often, I try to write .Net code in PHP. This is very difficult. In the latest project I did, namely, this blog, I tried to do the exact opposite. I decided to write my PHP to make it look like PHP. To me, it seems a little unnatural. Mixing in logic and presentation. Mixing in database access code with presentation. Basically creating no layers between anything. Get some data from a database, output the data with HTML tags interspersed with the data.
PHP has added a lot of stuff to try to get away from it’s humble beginnings. They’ve added objects, namespaces, frameworks for doing MVC or other types of architectures. But I find that all of it is kind of done poorly. Without getting into too much of a rant, it seems like PHP is just trying to add features, just to be like the big boys. But in the end, it makes everything look inconsistent, and gives people a bad impression. Nobody complains that C doesn’t have classes, interfaces, and namespaces. If you want that, go find another language. PHP could have taken a lesson from that, but alas it’s too far gone.