From: Greg Beaver > The PEAR base class also has this design flaw in several methods. It > has caused nothing but annoying and unfixable bugs. The only good > solution is to redesign by splitting the methods into two methods, one > static, one not. It's best to do this before the stable label is > applied, unless you like getting the same valid bugs reported over and > over with different permutations :)
Say dom load were split into 2 methods (this is not something that should be required to do). One static and one a regular public function. As shown with the simplexml example, the regular function would still not work correctly. The method I used in that example, is not a static method, but if called within another class method, it is allowed to be called using the static syntax (which is not allowed when called that way outside of a class scope), and it also picks up the scope of the object that is is called from (which is wrong). To top it off, behavior of the statically called method is also affected by the type of the class calling it (also shown there). Rob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php