How to implement set theory operations in pure php?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Which operations are you looking for? What are you trying to accomplish?
In PHP an array is (imperfectly) analogous to a set, and PHP has
array_intersect,array_merge(union), andarray_diff(complement) functions built in. There’s alsoarray_uintersectandarray_udifffor handling complex objects whose comparisons are not so straightforward.Is there further functionality you need?