Re: object literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/2/09 6:45 AM, "Robert Cummings" <robert@xxxxxxxxxxxxx> wrote:

> It's not what I want, I'm not the original poster.

as op, i think i'm going to stick with the cast. but it's been an
interesting thread and i learned some useful things.


> Regardless though, it
> comes down to the preference of the developer. It can certainly be
> simpler to type:
> 
>     $obj->blah->bleh->bluh;
> 
> than to type:
> 
>     $obj['blah']['bleh']['blug'];

exactly. and i dislike typing

   "SELECT col FROM tab WHERE a=" . $a['blah'] . " AND ... "

or even

   "SELECT col FROM tab WHERE a={$a['blah']} AND ... "

when i could type 

   "SELECT col FROM tab WHERE a=$a->blah AND ... "

which is also easier to read.

i'm really lazy about typing. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux