atom feed15 messages in net.php.lists.internals[PHP-DEV] Suggestion: echo function(v...
FromSent OnAttachments
TigJun 3, 2010 6:11 pm 
Kalle Sommer NielsenJun 3, 2010 6:19 pm 
Jonathan WageJun 3, 2010 6:20 pm 
TigJun 3, 2010 6:29 pm 
Jonathan WageJun 3, 2010 6:35 pm 
Kalle Sommer NielsenJun 3, 2010 7:01 pm 
Stas MalyshevJun 3, 2010 10:51 pm 
mathieu.suenJun 4, 2010 12:17 am 
Richard QuadlingJun 4, 2010 12:59 am 
mathieu.suenJun 4, 2010 1:19 am 
Harrison YuanJun 5, 2010 3:47 am 
Felipe PenaJun 5, 2010 12:28 pm 
Jille TimmermansJun 6, 2010 1:09 pm 
Harrison YuanJun 7, 2010 1:06 am 
Felipe PenaJun 7, 2010 8:01 am 
Subject:[PHP-DEV] Suggestion: echo function(var)[0];
From:Tig (tigg@gmail.com)
Date:Jun 3, 2010 6:11:50 pm
List:net.php.lists.internals

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.