note 113635 added to arrayobject.getiterator

From: Date: Thu, 07 Nov 2013 22:10:56 +0000
Subject: note 113635 added to arrayobject.getiterator
Groups: php.notes 
Request: Send a blank email to php-notes+get-197461@lists.php.net to get a copy of this message
ArrayObject iterator class requires a child of ArrayObject or ArrayIterator <?php class MyIterator implements Iterator { public function __construct(ArrayObject $array, $flags = 0) { // ... } public function current() { // .. } public function next() { // .. } public function key() { // .. } public function valid() { // .. } public function rewind() { // .. } } $obj = new ArrayObject(array(), 0, 'MyIterator'); $obj->getIterator(); ?> PHP Fatal error: ArrayObject::getIterator(): Internal compiler error, Class is not child of ArrayObject or ArrayIterator in php shell code on line 1 ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/arrayobject.getiterator.php Edit -- https://master.php.net/note/edit/113635 Del: integrated -- https://master.php.net/note/delete/113635/integrated Del: useless -- https://master.php.net/note/delete/113635/useless Del: bad code -- https://master.php.net/note/delete/113635/bad+code Del: spam -- https://master.php.net/note/delete/113635/spam Del: non-english -- https://master.php.net/note/delete/113635/non-english Del: in docs -- https://master.php.net/note/delete/113635/in+docs Del: other reasons-- https://master.php.net/note/delete/113635 Reject -- https://master.php.net/note/reject/113635 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197461) next »