Re: PHP Overload __call() and case sensitive

From: Date: Sat, 08 May 2004 10:52:22 +0000
Subject: Re: PHP Overload __call() and case sensitive
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29004@lists.php.net to get a copy of this message
Hi, Le ven 07/05/2004 à 21:22, Lukas Smith a écrit : > Lukas Smith wrote: > > > Guillaume Lecanu wrote: > > > >> Hi, > >> > >> With the PHP overload system, when a method is call, the internal > >> __call() method don't return the correct case of the method. > >> > >> Anybody know how to get the correct case of the method called ? > >> > >> For my XML_FastCreate, we can use translation option to bypass this bug, > >> but this is not the best solution. > > > > > > can you provide a short script to reproduce the problem, so that I can > > forward it to the relevant internals guy (aka marcus)? This is a short script for reproduce the problem : <?php class Test { function _call($method, $args) { print "[$method]"; } } if (phpversion() < 5) { class Test_Overload extends Test { function __call($method, $args, &$return) { if ($method != __CLASS__) { $return = $this->_call($method, $args); } return true; } } if (function_exists('overload')) { overload('Test_Overload'); } } else { class Test_Overload extends Test { function __call($method, $args) { if ($method != __CLASS__) { return $this->_call($method, $args); } } } } $t = new Test_Overload; $t->lower(); $t->UPPER(); ?> > > ah this is a php4 bug. > this will make it tricky to the point of impossible to get this bug fixed.. I think so.. Thanks,

« previous php.pear.dev (#29004) next »