Edit report at https://bugs.php.net/bug.php?id=60161&edit=1

 ID:                 60161
 Updated by:         johan...@php.net
 Reported by:        ni...@php.net
 Summary:            Implementing an interface extending Traversable is
                     order dependent
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        5.4.0beta2
 Block user comment: N
 Private report:     N

 New Comment:

Actually we should forbid extending Traversable. This should only only only be 
used by internal classes (Iterator, iteratorAggregate or classes providing the 
C get_iterator hooks)


Previous Comments:
------------------------------------------------------------------------
[2011-10-28 18:45:18] ni...@php.net

Description:
------------
When implementing an interface which extends Traversable together with one of 
the concrete Traversable implementations (i.e. Iterator or IteratorAggregate) 
the latter must be named first in order to not throw an error.

Compare:
http://codepad.viper-7.com/OJt8XN
http://codepad.viper-7.com/1AnU5Z

Responsible code:
http://lxr.php.net/xref/PHP_5_4/Zend/zend_interfaces.c#zend_implement_traversable



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60161&edit=1

Reply via email to