Re: Coding methods (was RE: [PHP-DB] gzip image files)
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Coding methods (was RE: [PHP-DB] gzip image files) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14601@lists.php.net to get a copy of this message | ||
I use the former method when concatenating say a complex SQL query thru a loop or loops, and me
being the person I am like to keep things standard and consistant so I use the same method when I
wish to concatenate simpler strings.
Russ
On Tue, 27 Nov 2001 09:28:37 -0600 "Boget, Chris" <Chris.Boget@wild.net> wrote:
> > $filename = 'kunden/'.$name.'.png';
>
> I see this all the time and I'm curious: what takes more
> computing power (granted, either would be incredibly little
> I'm sure, just curious which requires more work by PHP)?
>
> this:
>
> $filename = "this " . $varname . " that";
>
> or this:
>
> $filename = "this $varname that";
>
> I would think the latter example but am not sure.
>
> Another question, but this is more about personal style:
>
> I almost always use the latter method in my coding practices. It
> looks cleaner and, IMO, is easier to follow especially when there
> are a number of variables involved. For those that use the former
> method, why do you? I'm not trying to be judgemental, just curious
> why people do what they do. In asking, I may actually learn some-
> thing. :p
>
> Chris
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#