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

Remove usage of PHP list function #38

Closed
aamplugin opened this issue Jan 25, 2020 · 0 comments
Closed

Remove usage of PHP list function #38

aamplugin opened this issue Jan 25, 2020 · 0 comments
Assignees
Milestone

Comments

@aamplugin
Copy link
Owner

To mitigate any unexpected issues between PHP 5 & 7, it is recommended to avoid using list function https://www.php.net/manual/en/function.list.php

Warning! In PHP 5, list() assigns the values starting with the right-most parameter. In PHP 7, list() starts with the left-most parameter.

If you are using plain variables, you don't have to worry about this. But if you are using arrays with indices you usually expect the order of the indices in the array the same you wrote in the list() from left to right, which is not the case in PHP 5, as it's assigned in the reverse order.

Generally speaking, it is advisable to avoid relying on a specific order of operation, as this may change again in the future.

@aamplugin aamplugin added this to the 6.3.0 milestone Jan 25, 2020
@aamplugin aamplugin self-assigned this Jan 25, 2020
aamplugin pushed a commit that referenced this issue Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant