Re: Renaming Functions Quizz

From: Date: Fri, 09 Feb 2001 17:22:29 +0000
Subject: Re: Renaming Functions Quizz
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-2377@lists.php.net to get a copy of this message
I admit that I find this somewhat unclear - it would be better if you expanded your explanation. --zak ----- Original Message ----- From: "Hellekin O. Wolf" <hellekin@mmania.com> To: <php-qa@lists.php.net> Sent: Friday, February 09, 2001 10:17 AM Subject: [PHP-QA] Renaming Functions Quizz > Here is a quizz to test the coding habits and concensus among us for naming > stuff in PHP. > Please reply to me personally so I can post a summary of replies next week... > > What is it ? / Is this valid [in the new naming scheme] > > a - $LongName > b - $Long_Name > c - $long_name > d - $_long_name > e - $_LONG_NAME > f - $longName > g - $LONGNAME > h - $LONG_NAME > > i - functionName() > j - FunctionName() > k - function_name() > > l - > function my_function($var) { > global $_msg; > > if (!empty($_msg)) > echo "<p> $_msg </p>\n"; > > // Do stuff > return $ret; > } > > m - > function my_function($var) > { > global $MSG; > > if (!empty($MSG)) > echo "<p> $MSG </p>\n"; > > // Do stuff > return $ret; > } > > n - > function myFunction($var) { > global $_msg; > > if (!empty($_msg)) > echo "<p> $_msg </p>\n"; > > // Do stuff > return $ret; > } > > o - > class MyClass { > > var $foo; > var $foo_bar; > > // Constructor > function MyClass() { > $this->foo = 1; > $this->foo_bar = $this->foo_bar($this->foo); > } > > function foo_bar($foo) { > return pow($foo,2); > } > } > > > p - [Insert any more example here] > > > hellekin > > > -- > PHP Quality Assurance Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net > For additional commands, e-mail: php-qa-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.qa (#2377) next »