¡@

Home 

php Programming Glossary: pointer

How foreach actually works

http://stackoverflow.com/questions/10057671/how-foreach-actually-works

When foreach first starts executing the internal array pointer is automatically reset to the first element of the array. Right..... this seems to suggest that foreach relies on the array pointer of the source array. But we've just proved that we're not working.. array right Well not entirely. Test case 3 Move the array pointer on one to make sure it doesn't affect the loop var_dump each..