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

PHP-function each() has been deprecated #28

Closed
alexgit2k opened this issue Dec 5, 2017 · 0 comments
Closed

PHP-function each() has been deprecated #28

alexgit2k opened this issue Dec 5, 2017 · 0 comments

Comments

@alexgit2k
Copy link

alexgit2k commented Dec 5, 2017

The PHP-function each() has been deprecated as of PHP 7.2.0 (https://wiki.php.net/rfc/deprecations_php_7_2#each), but is still used:

src/AbstractValue.php: list($type, $value) = each($xmlAsArray);
src/AbstractValue.php: list($type, $value) = each($namespaceXmlAsArray);

test/RequestTest.php: while (list(, $node) = each($result)) {
test/RequestTest.php: while (list(, $node) = each($result)) {

So each() should be replaced by foreach() which is also 10 times faster or key()/current()/next().

Makinami added a commit to Makinami/zend-xmlrpc that referenced this issue Jan 25, 2018
weierophinney added a commit that referenced this issue Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant