This repository was archived by the owner on May 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 816
PHP-functions each() and create_function() have been deprecatedΒ #747
Copy link
Copy link
Open
Labels
Description
The PHP-functions each() and create_function() have been deprecated as of PHP 7.2.0, but are still used in ZF1:
demos/Zend/Mobile/Push/ApnsFeedback.php: while(list($token, $time) = each($tokens)) {
documentation/manual/en/module_specs/Zend_Mobile_Push-Apns.xml:while(list($token, $time) = each($tokens)) {
library/Zend/Cache/Backend.php: while (list($name, $value) = each($directives)) {
library/Zend/Config/Yaml.php: while (list($n, $line) = each($lines)) {
library/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php: while (list ($key, $value) = each($group)) {
library/Zend/XmlRpc/Value.php: list($type, $value) = each($xml);
library/Zend/XmlRpc/Value.php: list($type, $value) = each($namespaceXml);
tests/Zend/XmlRpc/RequestTest.php: while (list( , $node) = each($result)) {
tests/Zend/XmlRpc/RequestTest.php: while (list( , $node) = each($result)) {
tests/runalltests.php: while(list(, $file)=each($files)) {
So each() should be replaced by foreach() which is also 10 times faster or key()/current()/next().
- create_function() (https://wiki.php.net/rfc/deprecations_php_7_2#create_function)
library/Zend/Feed/Element.php: return array_map(create_function('$e', 'return new Zend_Feed_Element($e);'), $nodes);
Note
As ZF1 reached its End of Life, please note it here, if you forked ZF1 with PHP 7.2 Support.
maxmilton, thedotedge, Bukashk0zzz and MonsieurV