Posted by ZeldorBlat on 12/07/05 05:43
Chung Leong wrote:
> Is there anything funcationally difference between the following
> snippets:
>
> // first
> $lines[] = array();
> $line =& $lines[count($lines) - 1];
>
> // second
> $line = array();
> $lines[] =& $line;
>
> They should do the thing. A voice in my head though is saying there's a
> subtle difference.
They look the same to me -- at the end of the day both $line and
$lines[0] point to the same, empty array. Of course #2 is more
readable and straightforward.
Navigation:
[Reply to this message]
|