Skip to content
New issue

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

Assigning to array with list has changed in PHP 7. #76

Open
frankdejonge opened this issue Dec 6, 2015 · 1 comment
Open

Assigning to array with list has changed in PHP 7. #76

frankdejonge opened this issue Dec 6, 2015 · 1 comment

Comments

@frankdejonge
Copy link

I'd recommend to alter the recommendation to always sort by key rather than an array_reverse.

Example: https://3v4l.org/scmZ8

@dseguy
Copy link
Owner

dseguy commented Dec 7, 2015

Dag, Frank.

Yes, ksort is good too, especially with array appending ($b[], $b[], ...).

array_reverse + the 2nd parameter set to True (preserve keys) is also good.
I'll mention explicitely the 2nd parameter of array_reverse, and ksort.
That will be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants