> Static class methods certainly do work, and have for some time. I think
> Shaun's point is that variable-named function support seems to be
> missing for calling static class methods.
Then it looks like somebody needs to file a couple Feature Requests:
Documentation to validate that calling s
Static class methods certainly do work, and have for some time. I think
Shaun's point is that variable-named function support seems to be
missing for calling static class methods.
John
On Thu, 18 Jan 2001, Richard Lynch wrote:
> > Check out chapter 13 of the php manual:
> > http://www.php.net
> Check out chapter 13 of the php manual:
> http://www.php.net/manual/en/language.oop.php
> "Static class methods are apparently supported in php v4.02"... using
> :: notation.
A user-comment that "it works" does not exactly qualify as a documented
feature...
I wouldn't count on it.
By Day:
Well, essentially, a static class method is a method that can be called
without any instances of the class. It's just a nice way to group
functions for your class.
Check out chapter 13 of the php manual:
http://www.php.net/manual/en/language.oop.php
"Static class methods are apparently support
> $junk="xml::hi_handler";
> $junk();
>
> Fatal error: Call to undefined function: xml::hi_handler()
Perhaps this:
$j1 = "xml";
$j2 = "hi_handler";
$j1::$j2();
Wait. Are you saying you don't have an instance of an xml object?... I'm
surprised you can even call xml::hi_handler() without one in
Hi all,
Hope you can help. I have an class called xml and a class method called
hi_handler. I am able to call this method statically as follows:
xml::hi_handler($attrs);
but when I try to call it like this, it fails miserably:
$junk="xml::hi_handler";
$junk();
Fatal error: Call to undefined
6 matches
Mail list logo