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
-
sboesch5465yBefore we got short array syntax, I would have agreed. But I think it's at least ok now.
-
What do you not like about them? I think they are really "JSON like" already.
array(
"test" => 1337,
"sub_array" => array()
);
is pretty nice. -
hjk10156965yNo it's not. Arrays can not contain key value pairs. You need an object for that. Arrays are indexed by sequential numbers in almost all languages.
-
hjk10156965yMy beef is not with arrays but with objects that can not be initialized like in JSON. That makes people use arrays where the syntax of an object is nicer. (I know one can convert an array but that is way to much overhead).
One of not many things I really hate about PHP is when I have to write arrays. They so sugary, it is very shitty experience. I just hope we can get JSON style arrays some day.
rant
php arrays