> I definitely get where you're coming from. But everyone is different, and thinks differently.
You have talked about preference a lot, and I honestly don't really care what people do or don't prefer, that's totally up to them. I will judge people for it, in the same way I would question someone's judgement if they insisted against all evidence that there was nothing wrong with their shoe-hammer. Personaly I quite liked Objective-C, but a lot of people kinda thougt it was the devil in programming language form.
The problem with PHP is that there's a huge amount you have to know about the corner cases and edge cases that could cause you to write a bug or security flaw into your application. It's like there's an encyclopedia of weird behaviour that you have to remember all of, and it's going to be hard to remember all of the issues in all situations.
> The problem with PHP is that there's a huge amount you have to know about the corner cases and edge cases that could cause you to write a bug or security flaw into your application.
The amount of PHP you need to know to avoid the sharp edges depends on the complexity of your application and what you're trying to do.
I don't make assumptions about what people are trying to build.
> I will judge people for it, in the same way I would question someone's judgement if they insisted against all evidence that there was nothing wrong with their shoe-hammer.
I also don't make assumptions about how a person evaluated and/or prioritized the tradeoffs involved with their choices, because their choice in itself doesn't tell a complete story.
Sometimes what might appear to be a bad choice was well reasoned at the time it was made. When Twitter was made, "Rails doesn't scale" was a common insult against it. But Twitter might not have been built they been forced to make it in Java.
> The amount of PHP you need to know to avoid the sharp edges depends on the complexity of your application and what you're trying to do.
Not really. You aren't insulated from the edge cases until your application reaches a certin number of lines, at which point PHP flips the switch and you get the edge cases.
The edge cases are there and affect you from the smallest program right up to the largest, it's just that with larger programs you're more likely to hit them because you have more code. The target is bigger.
So you're saying if I do a simple PHP status page that is only rendering data from a static JSON file into some HTML (which is basically all I'd use PHP for these days) it requires me to know a pile of edge cases?
Does someone making a simple a PHP application on a home NAS that isn't exposed to the outside world need to worry about SQL injection from their kids?
Are you saying that PHP is only suitable for trivial non user-facing apps? We are in agreement!
The reason you need to know all the edge cases though is because when you write a sigle line of PHP you need to know how to avoid the edge cases in that single line.
Just because you are writing a short program doesn't mean the edge cases aren't there. Array keys getting converted to numbers doesn't suddenly start to become a problem when you hit 300k lines.
If you don't know the edge cases then when you do need to write something more complex, or larger, or user facing, PHP is a terrible choice because there are so many edge cases that they are hard to completely internalise.
Wouldn't it be better to write in something that isn't such a terrible footgun?
You have talked about preference a lot, and I honestly don't really care what people do or don't prefer, that's totally up to them. I will judge people for it, in the same way I would question someone's judgement if they insisted against all evidence that there was nothing wrong with their shoe-hammer. Personaly I quite liked Objective-C, but a lot of people kinda thougt it was the devil in programming language form.
The problem with PHP is that there's a huge amount you have to know about the corner cases and edge cases that could cause you to write a bug or security flaw into your application. It's like there's an encyclopedia of weird behaviour that you have to remember all of, and it's going to be hard to remember all of the issues in all situations.