Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
shdw9507yTBH I think you either don't know PHP at all or you are still caught in early 2000 (5.6j)
Could you provide any facts or example? -
m3ty6647y@shdw
I use PHP by myself and i think it has also some benefits.
But there are many reason why PHP is just ****;
- inconsistent function names
- no unicode support
- ugly syntax (at least i think it's ugly)
- "==" is pretty bad, php converts everything to ints if posssible
Example why == is bad:
"20" == " 20" -> true,
"4.2" == "4.20" -> true,
"0x10" == "16" -> true
There are still a lot of reasons, why PHP isn't a good language.
Btw.: This image is just a joke, dont take it to serious^^ -
shdw9507y@m3ty could add a few more to the list, but then again there are cool features such as Closures, lambdas, traits etc.
Anyways the bottom line for me is that I think whatever language you use should be written carefully. One would never use the == comparator fx but the === so I can't really see the big hurdle in that particular case. There are also methods provided for type comparison. Personally I really like the "arrays" (ordered maps) in PHP as they've helped me lots of time creating fast recursive algorithms with constant selections. Again, one has to consider potential pitfalls but that goes for all languages. -
The things I miss most in PHP are:
A good type system with type constructors and generics... trivial stuff in Go, Haskell, Rust, Java, etc; In PHP it all requires very verbose intermediate classes. You can't type hint "An array of RGB colors", or "a callable which takes an int and gives a string"
And fucking arrow functions, or some other terse way to write lambdas.
Related Rants
How could you ever explain this to your family? PHP eww
undefined
image
php