Re: Capitals in function names v get_class_methods
| From: | dan frost | Date: | Tue, 10 Feb 2004 23:14:30 +0000 |
| Subject: | Re: Capitals in function names v get_class_methods | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10617@lists.php.net to get a copy of this message | ||
Thanks. I've been using PHP5 a little, but hadn't tried this one. I kind of suspected this answer, though.
Roll on 5.
Regards,
dan
Stefan Neufeind wrote:
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) {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// 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