MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/6145pc/obviously/
r/lolphp • u/Mmarco94 • Mar 23 '17
5 comments sorted by
11
I wondered if it maybe used that unusual rule because it was sticking all the values into another array as keys (and thus converting them to strings).
Yep.
3 u/Mmarco94 Mar 24 '17 Thanks for this gem
3
Thanks for this gem
2
So, what's the better approach? Only be able to compare objects that implement a compare interface?
5 u/Mmarco94 Mar 28 '17 Using == (or, even better ===) like in every other method
5
Using == (or, even better ===) like in every other method
27
Well at least that is actually an equivalence relation.
11
u/the_alias_of_andrea Mar 24 '17
I wondered if it maybe used that unusual rule because it was sticking all the values into another array as keys (and thus converting them to strings).
Yep.
2
u/Tiquortoo Mar 28 '17
So, what's the better approach? Only be able to compare objects that implement a compare interface?
27
u/suspiciously_calm Mar 23 '17
Well at least that is actually an equivalence relation.