[PHP] Iterating ASTs with SPL in PHP-5.3.1

2010-01-19 Thread Aspra Flavius Adrian
Hi I have an abstract syntax tree which I need to iterate. The AST is generated by the lemon port to PHP, found in PEAR. Now "normally", I'd do it with the brand new and shiny (PHP 5.3.1) SPL classes, and it would look like this: $it = new \RecursiveIteratorIterator( new \RecursiveArra

Re: [PHP] Inherited and unimplemented method of a class

2008-04-29 Thread Aspra Flavius Adrian
On Tue, Apr 29, 2008 at 4:29 PM, Stut <[EMAIL PROTECTED]> wrote: > > > On 29 Apr 2008, at 15:19, Aspra Flavius Adrian wrote: > > > > Hello folks. > > > > An inherited and unimplemented method of a class in PHP-5.2.5 gets called > twice: > >

[PHP] Inherited and unimplemented method of a class

2008-04-29 Thread Aspra Flavius Adrian
Hello folks. An inherited and unimplemented method of a class in PHP-5.2.5 gets called twice: class Foo { public function foo() { echo get_class($this);//or __CLASS__; } } class Bar extends Foo { } $f = new Bar; $f->foo(); Shouldn't it be only once? If I'm doing s