This is a discussion on class method as callback function within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, I am trying to use a method declared in a parent class as callback for let's say an &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am trying to use a method declared in a parent class as callback for let's say an "array_walk" function. I have found some information here http://www.faqts.com/knowledge_base/...id/1725/fid/39 /*$this->"print_array" does the job... DZ: Or, a better method: array_walk($fruits, array($this, 'print_array')); */ The second method warks although I do not see how it can be justified after reading the documentation. How can I use such a static method as callback function ? I am using PHP5 of course. Johan |