Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Fixes issue with sorting in PHP7 #44

Merged
merged 1 commit into from
Apr 21, 2016

Conversation

heiglandreas
Copy link
Member

@heiglandreas heiglandreas commented Apr 21, 2016

This PR alters the sort-algorithm used for testing which before was based on the position of the entry in the array and is now solely based on the value itself.

Due to changes in PHP7 sorting based on the key of the value was not working in PHP7 as it was in PHP5 so there was need for a change.

Now the values are sorted by the number of "1" in the binary representation of the value. If that is equals the natural sorting algorithm is used.

This also fixes #32

This commit alters the sort-algorithm used for testing which before was
based on the position of the entry in the array and is now solely based
on the value itself.

Due to changes in PHP7 sorting based on the key of the value was not
working in PHP7 as it was in PHP5 so there was need for a change.

Nowe the values are sorted by the number of "1" in the binary
representation of the value. If that is equals the natural sorting
algorithm is used.
@heiglandreas heiglandreas added this to the 2.7.0 milestone Apr 21, 2016
@heiglandreas heiglandreas mentioned this pull request Apr 21, 2016
@heiglandreas heiglandreas self-assigned this Apr 21, 2016
@heiglandreas heiglandreas merged commit 7f54b98 into zendframework:master Apr 21, 2016
heiglandreas added a commit that referenced this pull request Apr 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix ZendTest\Ldap\SortTest::testCustomSorting for HHVM
1 participant