OK, so it's a Friday hence a random debate....

What is preferred for class methods?

class foo
{
 static public function bar(){}

 public static function wibble(){}
}

??

All methods are valid, but are some more valid than others? :p

Checking ZF:

[colin@jimmy Zend (working)]$ cgrep "public static function" . |wc -l
755
[colin@jimmy Zend (working)]$ cgrep "static public function" . |wc -l
60

It's clear which is preferred there, but still not absolutely consistent
(I didn't bother checking differently scoped methods).


I personally prefer scope first then "static", but others may have valid
reasons/arguments for preferring the other way.

WDYT?

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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

Reply via email to