We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here are some tests
Numbers
$a = [1]; $b = [PHP_FLOAT_EPSILON + 1]; $r = ArrayDiffMultidimensional::compare($a, $b); // expected: [1], actual: [] var_dump($r);
Arrays
$a = [[]]; $b = [1]; $r = ArrayDiffMultidimensional::compare($a, $b); // expected: [[]], actual: [] var_dump($r);
References
$a = [1, 2, &$a]; $b = [1, 2, &$b]; $r = ArrayDiffMultidimensional::compare($a, $b); // expected: [], actual: infinite recursion var_dump($r);
The text was updated successfully, but these errors were encountered:
Thank you @sorinsarca! I will add them on the test suite
Sorry, something went wrong.
The references issue is quite a corner case, and since I do not have a lot of time I think I will not add support for it.
I suggest to use ArrayObject to create a copy of the array before passing it to the compare call: https://www.php.net/manual/es/arrayobject.getarraycopy.php
ArrayObject
compare
I have released 2.0.0 Thank you for opening this issue.
rogervila
No branches or pull requests
Here are some tests
Numbers
Arrays
References
The text was updated successfully, but these errors were encountered: