Hi,
i just was wondering how existing function names could be used as method names
in OO-Extensions for PHP5. I've looked through the SPL-source where this is done with
functions like current()
and next()
in the iterators, but I couldn't find a hint how to do this.
Can someone give me a little hint what is needed to do that.
Many thanks in advance,
Daniel
Hi,
i just was wondering how existing function names could be used as method names
in OO-Extensions for PHP5. I've looked through the SPL-source where this is done with
functions likecurrent()
andnext()
in the iterators, but I couldn't find a hint how to do this.Can someone give me a little hint what is needed to do that.
you can use any function name as method name without a clash. you just
cannot use language constructs that aren't real functions like
"empty", "echo" or "require" as method names.
this question better belongs to php-general, btw.
Many thanks in advance,
Daniel