Re: Capitals in function names v get_class_methods

From: Date: Tue, 10 Feb 2004 21:28:32 +0000
Subject: Re: Capitals in function names v get_class_methods
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10614@lists.php.net to get a copy of this message
On 10 Feb 2004 at 19:43, dan frost wrote: > I've just read in the pear guidelines that capitals are encouraged for > function and variable names. e.g. > > thisIsMyFunction($myVariable) { > // etc > } > > I've recently re-written a configuation language which is extensible > based purely on the fact that get_class_methods returns the available > functions. But, it returns them in lower case. > > Surely it would be better to: > i. write get_class_methods as case sensitive (perhaps it's lower than > this function though) ii. write all function in lower case Hi Dan, this is normal for PHP4. However, in PHP5 the returned names will correctly have upper-/lowercase. This is now necessary due to the correct DOM-implementation. So to be portable maybe strtolower the names returned before doing any comparison. Regards, Stefan

« previous php.pear.general (#10614) next »