Posted by rick on 03/28/07 13:17
> What led you to believe that? Where in the documentation does it say
> you can do it that way?
If only I could remember where ...
As far as I can remember it was a write up about the functionality
that was going to be available in php5 prior to the actual release.
IMHO it should be valid - it would save a lot of time coding
especially in the following instance ;-
if ( setArr()[ 3 ] === 2 )
{
....
}
instead of
$X = setArr() ;
if ( $X[ 3 ] === 2 )
{
....
}
etc.
The current syntax is a waste of an assignment - even if it is only a
reference.
Navigation:
[Reply to this message]
|