Re: PHP5 extensions: using existing functionnames as method names

From: Date: Wed, 13 Sep 2006 08:45:17 +0000
Subject: Re: PHP5 extensions: using existing functionnames as method names
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-25653@lists.php.net to get a copy of this message
On Wed, Sep 13, 2006 at 10:09:08AM +0200, danhen@email.de wrote: > 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. 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

« previous php.internals (#25653) next »