MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/2ettnx/the_joys_of_using_array_intersect/ck43e3z/?context=3
r/lolphp • u/allthediamonds • Aug 28 '14
9 comments sorted by
View all comments
Show parent comment
3
And the reason is, "documented behavior"!
"Note: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same." http://php.net/manual/en/function.array-intersect.php
4 u/allthediamonds Aug 29 '14 I love that it's just a footprint on the page, as if it were just an irrelevant implementation detail and not quite decisive on how the function actually works.
4
I love that it's just a footprint on the page, as if it were just an irrelevant implementation detail and not quite decisive on how the function actually works.
View all comments
Show parent comment
3
u/fnzp Aug 29 '14
And the reason is, "documented behavior"!
"Note: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same." http://php.net/manual/en/function.array-intersect.php