5 ms·
Could you tell us why the PHP is a terrible language?
by aurora72 16y ago
Could you tell us why the PHP is a terrible language?
- ronhipp 16y agoAnswer: It's not! PHP is easy to understand, easy to deploy, and very flexible. Of course with flexibility and ease of use comes ease of abuse, but that's true of most any language. As for people shying away from so called enterprise languages like Java and .NET, that simply is not true, at least where Microsoft technologies are concerned. ASP, C#, and .NET built on Microsoft DB stacks are faster, and more scalable than similar web apps built on LAMP or RoR stacks. Check out Stack Overflow. I would switch to Microsoft technologies in a second if they were more affordable to get started with. As for Ruby or PHP, choose the one you like programming with. Neither is better or more popular in the real world.
- overgard 16y agoI've only used a PHP a small amount, so admittedly my observations are from an outside perspective, but there are a number of quirks that bother me about it (small example: (string)"false" == (int)0 ... seriously?). Seems nice enough for small projects that I just want to deploy quickly though. What really scares me away are hearing quotes from the author like this: "There are people who actually like programming. I don't understand why they like programming." And this: "I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I'll just restart apache every 10 requests." I can't trust a language from someone that says things like that. I know there's a whole community of people working on improving it now and so on, but it strikes me that the language was never designed very well, it's just been repeatedly patched to suck a lot less.
- chopsueyar 16y agoWow. So is it turning a string into a constant?
- Pewpewarrows 16y agoIs this a serious question? The creator of the language himself has admitted multiple times that it was never meant to be anything more than quick glue to add tiny dynamic content to a webpage, much like Perl was back in the day. He rarely adds anything to the language because he thinks PHP will be better for it, rather he described it as whatever features people yelled that they wanted more. As such it's turned into this mess of a language today that makes you want to cry whenever you have to work on it for anything beyond simple websites. OOP was clearly just an afterthought and is very poorly implemented / missing many core functions of real OOP languages. No threading support. In fact, the language itself isn't thread-safe to begin with. Libraries are close to non-existent for anything outside of basic web features. Function, method, constant, and argument naming conventions and ordering are completely inconsistent across the entire language. Because of this for everything related to say, strings, you're forced to always re-lookup the damn argument order because the language designers can never seem to decide whether needle or haystack should come first. The language has always taken years to get features that other languages took for granted a decade ago (like closures and namespaces). For years it had terrible defaults and practically encouraged insecure websites. Magic quotes anyone? I could go on a several hour tirade of why PHP is bad, but I'll just stop here. If you're still using it, I'm sorry.