On Fri, 2008-04-18 at 10:40 -0700, Kalle Sommer Nielsen wrote:
> Hey Internals
>
> I've been wondering for quite some time why PHP doesn't allow you to access
> arrays when you assign it to a value like in Javascript:
>
> function ArrayTest(Array $range)
> {
> return($range);
> }
>
> $range = Array(1337 => Array('Hello World'));
>
> echo ArrayTest($range)[1337};
I was just about to write an email asking this same exact question this
afternoon. This could be very useful, I don't see any reason not to have
it.
>
> I would really like to see this introduced in PHP sometime (Perhaps as
> an extra addition to 5.3's new and sleek features).
>
> This is very useful in a few areas and can save a few lines of code
> here and there.
>
> unfortunately Im not a C Programmer myself else I've would have
> provided a patch for this =/
>
>
> Cheers
>
> Kalle Sommer Nielsen
> Zend Certified Engineer
>
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php