JonathanAquino/Underscore.php — pull request #1 by mheijkoop (2014-11-18 11:31:28+00:00)
Title: Fix union() for nested array

For some reason the test for taking the union of a listed of nested array no longer actually tested a nested array since the fork of the original Underscore.php.

This pull request restores the original test and changes the `union()` implementation to properly work with nested values.

By default `array_unique` uses `SORT_STRING` which compares values by first casting them to strings which results in a notice and the string `"Array"` being used for comparison (which is obviously equal for all arrays).

By passing `SORT_REGULAR` values are compared the same way `==` does (eg `"42"` and `42` are still considered equal but array(42) and array(37) will no longer be the same).