Hello Everybody
I start to write PHP script and all veritable a defined without some
rules. I want to ask to you somebody know how is correct do different
some variable.
Like from next three variable who is correct:
$firstname $FirstName $firstName $first_name etc.
I know that from this
On Tue, 2010-07-27 at 10:10 +0200, Jordan Jovanov wrote:
Hello Everybody
I start to write PHP script and all veritable a defined without some
rules. I want to ask to you somebody know how is correct do different
some variable.
Like from next three variable who is correct:
$firstname
$firstName is the most readable.. for variables.
does anybody have negative thoughts on using the same naming format
for method/function and for class names?
i guess it's worth sharing! many thanks!
~viraj
On Tue, Jul 27, 2010 at 3:02 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On
On 27/07/10 10:42, viraj wrote:
$firstName is the most readable.. for variables.
does anybody have negative thoughts on using the same naming format
for method/function and for class names?
i guess it's worth sharing! many thanks!
~viraj
I like to use $firstName, and function firstName(),
Hello viraj,
As for classes, it's suggested to start a class name with a capital:
class MyBestClass {
...
}
As for functions and class methods, there are lots of people who name
them like this:
function the_greatest_function_in_the_world () {
...
}
Maybe it's readable and great, but I have a
yes andre, and in addition.. i have found the 'underscore' becomes a
handy delimiter character in certain cases. it's really helpful in
auto-loading and in calling user functions and in magic calls.
so, this is another reason to avoid 'underscore' in variable names.
code looks prettier and clean.
On 27 July 2010 13:04, viraj kali...@gmail.com wrote:
so, this is another reason to avoid 'underscore' in variable names.
code looks prettier and clean.
That's all in the eye of the viewer: underscores are much prettier to
me in variables. That's all just a roundabout way of saying it's
At 3:12 PM +0530 7/27/10, viraj wrote:
$firstName is the most readable.. for variables.
does anybody have negative thoughts on using the same naming format
for method/function and for class names?
i guess it's worth sharing! many thanks!
~viraj
I like using $first_name.
I don't have any
At 1:38 PM +0300 7/27/10, Andre Polykanine wrote:
Hello viraj,
As for classes, it's suggested to start a class name with a capital:
class MyBestClass {
...
}
In some languages (I can't remember if it is Java, or Javascript, or
both) the first letter should be lowercase, such as:
Tedd-
Java has classes listed with an Uppercase. It could be JS you're thinking of
but I'm not sure. Functions (except constructors) and variables have the
lowerUpperCamelCase notation.
Regards,
-Josh
On Jul 27, 2010, at 12:55 PM, tedd wrote:
At 1:38 PM +0300 7/27/10, Andre Polykanine
From: tedd
At 1:38 PM +0300 7/27/10, Andre Polykanine wrote:
Hello viraj,
As for classes, it's suggested to start a class name with a capital:
class MyBestClass {
...
}
In some languages (I can't remember if it is Java, or Javascript, or
both) the first letter should be lowercase, such as:
On 7/27/2010 12:38 PM, Andre Polykanine wrote:
Hello viraj,
As for classes, it's suggested to start a class name with a capital:
class MyBestClass {
...
}
As for functions and class methods, there are lots of people who name
them like this:
function the_greatest_function_in_the_world () {
...
Some style guides you might find interesting (the Code Igniter style
guide might be the most relevant to this discussion):
Django: Coding style
http://tinyurl.com/bn8jv8
ExpressionEngine: General Style and Syntax
http://tinyurl.com/dfh7fa
Flex: SDK coding conventions and best practices
13 matches
Mail list logo