in reply to Re: Why/how are these different?
in thread Why/how are these different?
I didn't know they were different like that. How perverse! Too bad they didn't limit it to 'foreach'
and created the confusion. I can't think of any other places where this could arise, off hand, but are there?
I noted that if I put parens around the args of the
'for', as in the prefix'd form, I get errors.
Hmmm...So even when you are clearly trying to use a postfix form, it throws an error instead of allowing it (though I understand why). I just can't figure out why it would have been designed that way.
And to think I stayed away from 'foreach' specifically because many books recommend doing so because it uses more memory (and I'm working with large arrays)...