I've come across the following line of code. It has issues:
- it is intended to do the same as push
- it ought to have used push
- it's hard to read, understand
- I've since changed it to use push
- it does something I thought was illegal, but clearly isn't
here it is:
$array [++$#array] = 'data';
My question is: what does it mean to pre-increment $#array? I always considered $#array to be an attribute of an array, and not writable.