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
-
Objects are fine.What I don't get is why the entirety of PHP is obsessed with arrays.
Like, wouldn't it be nice to not rewrite the same keys over and over? And not have to check is something "is set" or exits and just do shit?
Just make a simple DTO! -
@10Dev I have been thinking about but it looks more cohesive. Array of objects potentially means fuck all :-D
Oh gosh, I miss days when we have been doing everything in Map<String, Object>. That smell of sweat and shit... Mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm -
Arrays should be completely deprecated in favor of DS. And I think they will, eventually.
https://php.net/manual/en/...
You can basically cover everything with Sequence , Vector and Map, and then there's Set, Stack, Queue, Deque, etc. -
I don’t have to be that guy, but...................
Fuck php, especially arrays and objects.
joke/meme