Re: [PHP4BETA] no reverse fetch of arrays is BAD!
| From: | Faisal Nasim | Date: | Wed, 23 Feb 2000 12:11:28 +0000 |
| Subject: | Re: [PHP4BETA] no reverse fetch of arrays is BAD! | ||
| References: | 1 2 3 4 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10713@lists.php.net to get a copy of this message | ||
: > : > $x[-1] = 30;
: > : > print $x[-1]; // 30, doesn't seem to affect any positive index
: > : >
: > : > Is that a feature?
: > :
: > : I think that negative indeces maybe a useful feature, because a few
: > : languages have this
: > : already (notably MUMPS AFAIK).
: >
: > And don't forget Perl!
: >
: I don't agree!
: Perl supposes negative indeces as offset from the end of an array.
That is what I requested for in the first place! Negative indices
should start from the end of the array. But I think there are
workaround for it, and its fine as is!