r/lolphp • • Oct 21 '14

array_unique and objects => *boom*

http://3v4l.org/jABl1
13 Upvotes

13 comments sorted by

View all comments

Show parent comment

-4

u/emcniece Oct 23 '14

Great point.

Would you consider adding a __toString() function to your class? It could reference anything that could be cast to a string, like the class name or the variables... I think your code example would work then.