Hannes Magnusson wrote:
On Wed, May 5, 2010 at 11:41, Steven Van Poeck <svanpo...@gmail.com> wrote:
Hannes Magnusson wrote:
2. Make function/method names case-sensitive, per Stan's e-mail. Pros:
fixes problem; brings PHP into line with most other languages; extra
consistency with variables; possible performance improvement. Cons: BC
break from current documented behaviour.
There is no way this can happen. It will break massive amount of code
and will cause major headaches for people using __call().
-Hannes
Can you give an example of *consistent* code where this evolution would
cause __call() not to function properly ? I'm afraid I can't think of any...
Can you give an example of *consistent* code? Just any. Any at all.
Doesn't have to be long.
class Logs {
function getSQLLogger() {
return $this->logs["sql"];
}
function __call() {
return $this->logs["default"];
}
}
$logs->getSqlLogger()->logSql("...");
..call to undefined method default::logSql()...
-Hannes
Right. That's what I meant by inconsistent code. The call
$logs->getSQLLogger()->logSql("...") would function I presume.
The reason your example code does not is because it is inconsistent.
You're calling $logs->getSqlLogger() instead of $logs->getSQLLogger()
Or am I missing your point ?
--
Steven