> Why are you building arrays with mixed key types?
It happens on accident. All keys are converted to ints if they can be. So if you read a file that is called "123", it'll suddenly become an int key whereas all the rest will be strings. That's absolutely insane.
> Why do you want type hints?
The same reason anybody does. It is a contract and it makes your code more well-documented, more robust, and more correct. There's a reason that PHP has typehints and the consensus in all major, current, PHP projects is that they are good.
> Php has pthreads. They just arent needed that often.
Pthreads is garbage. Always has been. Never worked on servers. Is deprecated, finally: https://github.com/krakjoe/pthreads/issues/929
https://www.php.net/manual/en/intro.pthreads.php
> Async is being worked on You didnt mention it but immutable types are also being worked on.
PHP will be less awful when they're done. It's still awful today. I don't revel in PHP being bad. If it's good some day, I'll be happy.
> Everything people complain about php over tends to actually make its way into the language eventually.
25 years. 25 years and the language still sucks. Just use Java (or better yet, Kotlin).
> I dont know when you tried php, but I dont really think it was in earnest. It sounds like you had problems keeping your types straight.
I've been doing PHP dev for years now. Of course I had trouble keeping my types straight. PHP turns everything into a string whenever it can. Except sometimes it turns strings into ints for some unholy reason. Also, the type system (like Java's) sucks. It's not expressive at all and I can't even return a collection of a single type without resorting to language extensions.
> I agree its not super natural to deal with the php type system but once you learn it its pretty simple to keep things in order.
Not being natural is not the same thing as being broken. And being able to remember all of the gotchas doesn't make it simple.
> I see most messes arise when people mix types, mutate variables carelessly, or otherwise over leverage things they shouldnt (e.g. globals)
Agreed. So how do we avoid mutation? Use `clone`? Nope. It's shallow and everything is mutable by default. Overload `__clone()` on every class you write? Okay, but you better hope that your classes don't have fields that DON'T implement deep cloning...
> But these are hygiene problems, and all languages have these.
Bull. No language is perfect. But tell me, what's worse: 1 issue or 1,000 issues? Come on.
> Ive seen garbage java, ive seen hairballed rust, ive seen pretty much any c, ive seen wanky golang and ive seen babel-typescri-rea-tsx
See above. This is the most bottom-of-the-barrel excuse I keep reading over and over. PHP ENCOURAGES garbage code. Rust does not. Not even in the same ballpark. Not even playing the same GAME.
> The only thing that really annoys me about php these days is the dollar signs.
lol