Copyright note

These contents are not provided by PHP Reboot. PHP Reboot just collect good articles, blogs and tutorials. Contents are copyright material of respective author and/or website where they are originally published. Please follow the link to go to original post.

The internal pointer of an array

On his blog, Rob Allen is describing difference between foreach behavior on PHP 5 and PHP 7.

I discovered recently that if you walk through an array using array_walk or array_walk_recursive, then the array’s internal pointer is left at the end of the array. Clearly this isn’t something that I’ve needed to know before!