Bug #14763: Make [] of arrays readable
| From: | linus at mccabe dot nu | Date: | Sun, 30 Dec 2001 09:29:02 +0000 |
| Subject: | Bug #14763: Make [] of arrays readable | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75332@lists.php.net to get a copy of this message | ||
From: linus@mccabe.nu
Operating system:
PHP version: 4.1.1
PHP Bug Type: Feature/Change Request
Bug description: Make [] of arrays readable
Currently in php, you can append to a variable by using the [] form:
$a[] = 'a';
$a[] = 'b';
It would be great if you could also read an array in the same manner, ie:
$lastadded = $a[];
which would be equivalent to
$lastadded = $a[count($a)-1];
which is what you have to do today.
/linus
--
Edit bug report at: http://bugs.php.net/?id=14763&edit=1