Why is PHP so threatening to so many developers? Don't use it. Don't take jobs where it's the primary tool.
The complaining that it's a poor tool while many people create tons of value with it leads me to believe there's a disconnect between the two camps that I don't get.
Another reason, aside from inherited-mess, is that if you're an independent contractor, promises of cheap PHP projects make it harder to charge for quality work.
Because we inherit the horrible mess of shit PHP developers leave behind when the company finally releases they've painted themselves into a corner and can no longer move forward because every time they try to fix a bug in their software they add two more.
>Don't take jobs where it's the primary tool.
It is so widely used that even avoiding jobs where it is the primary tool, you will still almost certainly be stuck dealing with some PHP mess.
It can be but in my anecdotal experience the mess left by PHP developers is the worst. Especially when it comes to blatant XSS and SQL injection vulnerabilities PHP holds a clear lead.
There is a strong correlation. PHP makes it very difficult to write correct code. An app written in a language that goes out of its way to help you create more bugs is going to have, on average, more bugs than one written in a language that does not.
That "mess" your talking about is called technical debt. Technical debt is a real thing in any language not just PHP. I usually try to take this approach: make that "mess" less of a mess. Even just a little bit less of a mess. If not for your sanity, at least for the next developer behind you.
>Technical debt is a real thing in any language not just PHP
Oranges are a citrus fruit.
Does my argument strike you as being somewhat flawed? Making a true but irrelevant statement is not an argument. PHP is worse than other languages, not equal to them. You create more debt, and it is harder to fix. That is why experienced developers spend the time explaining to beginners that PHP is bad, rather than just ignoring PHP as the original poster wondered.
But what makes it "bad"? Everyone says it, but I don't think I've seen any solid arguments behind it. If it's just because you get a lot of less experienced developers using it (for the reasons mentioned in the article), then I fail to see how that is a flaw at all. If you're 12 years old and trying to get started with web development, then you're probably going to use Apache and PHP to do your first "Hello world".
In the grand scheme of things, there are very few websites that actually require a more robust back-end than PHP. Unless you're pulling in millions of hits, you don't have to worry about the inefficiencies of the language.
It's possible to design and structure something poorly in any language. Conversely, it's possible to write clear and concise individual sections of code in any language as well (assuming knowledge of that language, within reason).
That's why I never put too much stock into python arguments that feature syntax readability prominently. Unfortunately, being a perl guy I've heard quite a lot of those. There are plenty of other language features that could be used to make a point that have less well understood solutions (for perl, those are Perl::Tidy and Perl::Critic).
The complaining that it's a poor tool while many people create tons of value with it leads me to believe there's a disconnect between the two camps that I don't get.