[PHP] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Boget, Chris

 $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



RE: [PHP] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Jon Haworth

I use the latter style, because otherwise my syntax highlighting doesn't
kick in.

$filename = this $varname that;   # $filename is in blue, the
rest is in green

$filename = this. $varname. that;   # $filename and $varname are in
blue, the rest is in green

I've done it so much now it's burned into a finger macro, takes 0.01
seconds longer to type (approx)

Cheers
Jon



-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: 27 November 2001 15:29
To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: [PHP] Coding methods (was RE: [PHP-DB] gzip image files)


 $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



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]