Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor each() to foreach() for compatibility with PHP 7.2 #1377
An RFC for PHP 7.2 has been voted on for inclusion in PHP 7.2. It proposes to deprecate the
Things to note when refactoring:
1 similar comment
Feb 2, 2017
I'm not aware of any such use cases in actual Zen Cart code, old or new.
Reading http://php.net/manual/en/function.each.php and http://php.net/manual/en/function.list.php offer some insight, particularly the fact that
Thanks. Came across these elsewhere and was looking for correct solutions when I found your post here.
For the record,
... and list($key) = each($foo) is equivalent to Example C