Re: "public static" or "static public"?

From: Date: Fri, 28 Jan 2011 18:35:39 +0000
Subject: Re: "public static" or "static public"?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-311072@lists.php.net to get a copy of this message
Having learned java before even knowing what php was (yeah I'm a noob in both) I prefer scope static function. On Fri, Jan 28, 2011 at 12:20 PM, Fernando <fernando@ggtours.ca> wrote: > I personally like scope static fucntion. Coming from C# it just makes more > sense to me. > > JF. > > > On 28/01/2011 12:15, Colin Guthrie wrote: > >> 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 >> >> >> >> -- Mujtaba

« previous php.general (#311072) next »