Re: [PHP] Naming conventions

2004-10-02 Thread Daniel Schierbeck
"Jensen, Kimberlee" <[EMAIL PROTECTED]> wrote:
What do you use for your naming conventions for
variables
functions
classes
I'm trying to tell my students what the standard is currently. Are people using
camel case or underscores or both?
I use this:
$a_variable
ClassName
a_function()
aMethod()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Naming conventions

2004-10-01 Thread Greg Beaver
Jason Davidson wrote:
Oh please dont start a thread on which is better .. 
but i beleive it was decided that camel case is the standard now.
Jason

"Jensen, Kimberlee" <[EMAIL PROTECTED]> wrote: 

What do you use for your naming conventions for
variables
functions
classes
I'm trying to tell my students what the standard is currently. Are people using
camel case or underscores or both?
The standard in built-in PHP functions is underscores for procedural 
code (simplexml_load_string) and studlyCaps/CamelCaps for 
object-oriented code.  classes are named using CamelCaps 
(SimpleXMLElement) and methods are named using studlyCaps 
(SimpleXMLElement->attributes(), simpleXMLElement->asXML()).  It would 
be best to adhere to this standard, regardless of personal convictions, 
as any class that extends a built-in class will otherwise end up with a 
medley of method-naming conventions.

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


RE: [PHP] Naming conventions

2004-10-01 Thread Dan Joseph
Hi,

> What do you use for your naming conventions for
> variables
> functions
> classes
> 
> I'm trying to tell my students what the standard is currently. Are people
> using camel case or underscores or both?

I'm not sure there is a "standard" for naming things.  Here's how I
do it...

classes:  CHelloWorld { ... }
function: helloWorld() {  }
vars: hello_world

I guess I tend to stick to the camel style for function or class naming,
then use underscores in vars.  I also put a C before each class name.  There
is Hungarian notation that a lot of developers like to use.  You could
google that.

-Dan Joseph

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



Re: [PHP] Naming conventions

2004-10-01 Thread Paul Bissex
On Fri, 1 Oct 2004 11:28:57 -0700, Jensen, Kimberlee
<[EMAIL PROTECTED]> wrote:
> What do you use for your naming conventions for
> variables
> functions
> classes
> 
> I'm trying to tell my students what the standard is currently. Are people using 
> camel case or underscores or both?
> 

Without getting into personal preferences I'd say that  the closest
thing we have to an industry standard are the PEAR conventions:

  http://pear.php.net/manual/en/standards.naming.php

pb


-- 
paul bissex, e-scribe.com -- database-driven web development
413.585.8095
69.55.225.29
01061-0847
72°39'71"W 42°19'42"N

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



Re: [PHP] Naming conventions

2004-10-01 Thread Greg Donald
On Fri, 1 Oct 2004 11:28:57 -0700, Jensen, Kimberlee
<[EMAIL PROTECTED]> wrote:
> What do you use for your naming conventions for
> variables
> functions
> classes
> 
> I'm trying to tell my students what the standard is currently. Are people using 
> camel case or underscores or both?

You probably want to look at:

http://pear.php.net/manual/en/standards.php

The PEAR guidlines you will find there are what most of us use I think.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Naming conventions

2004-10-01 Thread Jason Davidson
Oh please dont start a thread on which is better .. 
but i beleive it was decided that camel case is the standard now.
Jason

"Jensen, Kimberlee" <[EMAIL PROTECTED]> wrote: 
> 
> What do you use for your naming conventions for
> variables
> functions
> classes
> 
> I'm trying to tell my students what the standard is currently. Are people using
> camel case or underscores or both?
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Fri 10/1/2004 11:16 AM
> To:   [EMAIL PROTECTED]
> Cc:   
> Subject:  [BULK] - php-general Digest 1 Oct 2004 18:16:29 - Issue 3028
> 
> php-general Digest 1 Oct 2004 18:16:29 - Issue 3028
> 
> Topics (messages 198379 through 198445):
> 
> php script run by cron job
>   198379 by: Merlin
>   198388 by: Nick Wilson
> 
> Re: Zend PHP Certification test
>   198380 by: Curt Zirzow
>   198391 by: Greg Donald
>   198436 by: Jay Blanchard
> 
> How do I produce a random database query for each day or week?
>   198381 by: I.A. Gray
>   198383 by: Merlin
>   198386 by: Graham Cossey
>   198413 by: -{ Rene Brehmer }-
> 
> Zend Optimizer not installed
>   198382 by: Ox
>   198384 by: Graham Cossey
>   198387 by: Wee Keat
>   198404 by: Dan Joseph
>   198432 by: Ox
> 
> Re: list of Months
>   198385 by: Marek Kilimajer
>   198408 by: afan.afan.net
>   198439 by: Paul Bissex
> 
> Re: mail() and Verizon
>   198389 by: Sam Smith
>   198443 by: Sam Smith
> 
> How I can get x509 certificate distinguished name?
>   198390 by: Diavolo
> 
> PHP (anti) crash policy?
>   198392 by: Olaf van der Spek
>   198393 by: Marek Kilimajer
>   198394 by: Manuel Lemos
>   198395 by: Olaf van der Spek
>   198396 by: Christophe Chisogne
>   198397 by: Manuel Lemos
>   198398 by: Marek Kilimajer
>   198399 by: Olaf van der Spek
>   198401 by: Christophe Chisogne
>   198403 by: Manuel Lemos
>   198405 by: Olaf van der Spek
>   198409 by: Manuel Lemos
>   198410 by: Olaf van der Spek
>   198412 by: Olaf van der Spek
>   198417 by: Manuel Lemos
>   198418 by: Manuel Lemos
>   198420 by: Olaf van der Spek
>   198421 by: Olaf van der Spek
>   198423 by: Olaf van der Spek
>   198424 by: Manuel Lemos
>   198425 by: Manuel Lemos
>   198426 by: Olaf van der Spek
>   198427 by: Manuel Lemos
>   198429 by: Manuel Lemos
>   198430 by: Olaf van der Spek
>   198431 by: Olaf van der Spek
>   198433 by: Olaf van der Spek
>   198434 by: Manuel Lemos
>   198435 by: Manuel Lemos
>   198438 by: Marek Kilimajer
> 
> Re: Suggestion for "IN()"
>   198400 by: Daniel Schierbeck
>   198402 by: Christophe Chisogne
>   198406 by: Daniel Schierbeck
>   198415 by: Ford, Mike
> 
> successive imap_open calls result in failure
>   198407 by: felix.compsoc.nuigalway.ie
>   198411 by: raditha dissanayake
>   198419 by: felix.compsoc.nuigalway.ie
>   198422 by: Michael Sims
> 
> Re: World time convertor
>   198414 by: -{ Rene Brehmer }-
> 
> Re: UNSUBSCRIBE
>   198416 by: -{ Rene Brehmer }-
> 
> Question about error_reporting()
>   198428 by: Al
>   198437 by: Greg Donald
>   198440 by: Al
>   198442 by: Greg Donald
> 
> PHP Host with PayFlow Pro
>   198441 by: Neal Carmine
> 
> Image Manipulation
>   198444 by: GH
> 
> PHP sandbox discussion
>   198445 by: Jason Davidson
> 
> Administrivia:
> 
> To subscribe to the digest, e-mail:
>   [EMAIL PROTECTED]
> 
> To unsubscribe from the digest, e-mail:
>   [EMAIL PROTECTED]
> 
> To post to the list, e-mail:
>   [EMAIL PROTECTED]
> 
> 
> --
> 
> 
> 
> 

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



[PHP] Naming conventions

2004-10-01 Thread Jensen, Kimberlee
What do you use for your naming conventions for
variables
functions
classes

I'm trying to tell my students what the standard is currently. Are people using camel 
case or underscores or both?


-Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:   Fri 10/1/2004 11:16 AM
To: [EMAIL PROTECTED]
Cc: 
Subject:[BULK] - php-general Digest 1 Oct 2004 18:16:29 - Issue 3028

php-general Digest 1 Oct 2004 18:16:29 - Issue 3028

Topics (messages 198379 through 198445):

php script run by cron job
198379 by: Merlin
198388 by: Nick Wilson

Re: Zend PHP Certification test
198380 by: Curt Zirzow
198391 by: Greg Donald
198436 by: Jay Blanchard

How do I produce a random database query for each day or week?
198381 by: I.A. Gray
198383 by: Merlin
198386 by: Graham Cossey
198413 by: -{ Rene Brehmer }-

Zend Optimizer not installed
198382 by: Ox
198384 by: Graham Cossey
198387 by: Wee Keat
198404 by: Dan Joseph
198432 by: Ox

Re: list of Months
198385 by: Marek Kilimajer
198408 by: afan.afan.net
198439 by: Paul Bissex

Re: mail() and Verizon
198389 by: Sam Smith
198443 by: Sam Smith

How I can get x509 certificate distinguished name?
198390 by: Diavolo

PHP (anti) crash policy?
198392 by: Olaf van der Spek
198393 by: Marek Kilimajer
198394 by: Manuel Lemos
198395 by: Olaf van der Spek
198396 by: Christophe Chisogne
198397 by: Manuel Lemos
198398 by: Marek Kilimajer
198399 by: Olaf van der Spek
198401 by: Christophe Chisogne
198403 by: Manuel Lemos
198405 by: Olaf van der Spek
198409 by: Manuel Lemos
198410 by: Olaf van der Spek
198412 by: Olaf van der Spek
198417 by: Manuel Lemos
198418 by: Manuel Lemos
198420 by: Olaf van der Spek
198421 by: Olaf van der Spek
198423 by: Olaf van der Spek
198424 by: Manuel Lemos
198425 by: Manuel Lemos
198426 by: Olaf van der Spek
198427 by: Manuel Lemos
198429 by: Manuel Lemos
198430 by: Olaf van der Spek
198431 by: Olaf van der Spek
198433 by: Olaf van der Spek
198434 by: Manuel Lemos
198435 by: Manuel Lemos
198438 by: Marek Kilimajer

Re: Suggestion for "IN()"
198400 by: Daniel Schierbeck
198402 by: Christophe Chisogne
198406 by: Daniel Schierbeck
198415 by: Ford, Mike

successive imap_open calls result in failure
198407 by: felix.compsoc.nuigalway.ie
198411 by: raditha dissanayake
198419 by: felix.compsoc.nuigalway.ie
198422 by: Michael Sims

Re: World time convertor
198414 by: -{ Rene Brehmer }-

Re: UNSUBSCRIBE
198416 by: -{ Rene Brehmer }-

Question about error_reporting()
198428 by: Al
198437 by: Greg Donald
198440 by: Al
198442 by: Greg Donald

PHP Host with PayFlow Pro
198441 by: Neal Carmine

Image Manipulation
198444 by: GH

PHP sandbox discussion
198445 by: Jason Davidson

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--





Re: [PHP] naming conventions

2001-07-26 Thread Peter Houchin

It doesn't really matter as far as I know except you cannot have a space, and 
its not common practice to use numbers with table names. The only thing that 
really matters as far as I'm concerned is that I remember how I've named it be 
it firstname or first_name or FirstName as long as you know then it doesn't 
really matter


I am interested in how to best name fields in mysql - and any issues
that may arise.

For example look at these field names:
"First Name" - is there any problem with the space?
"firstname", "first_name" or "FirstName" - is there a preference here?

In short I want to know if more than personal preference is involved
in naming fields...

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630



--
Peter Houchin
Sun Rentals STR Manager
Phone: 03 9329 1455
Fax:   03 9329 6755
[EMAIL PROTECTED]
http://www.sun.com.au/rentals
=
 _  __   /\
/_/_/_\/  |_/  \
   /_/_/___  __  __   __  / \
   \_/_/_\  /_/ /_/ /_/  /_/  \   _ /
 ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/
 \_//_/_/ /_/_/_/ /_/ \/_/v
    
/_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   /_/_ _/_/ __  __   __  /_/   __ __
  /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\/_//_/_/_/
 /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
/_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/
=
Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
* We rent the dot in .COM!  **


-- 
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]




[PHP] naming conventions

2001-07-26 Thread Matthew Delmarter

Hi guys,

I am interested in how to best name fields in mysql - and any issues
that may arise.

For example look at these field names:
"First Name" - is there any problem with the space?
"firstname", "first_name" or "FirstName" - is there a preference here?

In short I want to know if more than personal preference is involved
in naming fields...

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630


-- 
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]