Hi,

I've always wondered the same thing too. Would be a nice improvement.

- Jon

On Thu, Jun 3, 2010 at 9:12 PM, Tig <tigger...@gmail.com> wrote:

> Would be at all possible to implement this kind of shortcut?
>
> echo function(var)[0];
>
> For example, to print the height of an image:
> <?
>  echo getimagesize('./path/to/image')[1];
> ?>
>
> Sure, if you want more than one of the returned array points, this
> would not be very efficient, however when you do only need one, it
> would be a lot nicer than:
>
> <?
>  $tmp = getimagesize('./path/to/image');
>  echo $tmp[1];
> ?>
>
> Anyway, just an idea.
>
> -Tig
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You should follow me on Twitter: http://www.twitter.com/jwage

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.com

Reply via email to