note 116660 added to cachingiterator.getflags

From: Date: Fri, 06 Feb 2015 09:57:56 +0000
Subject: note 116660 added to cachingiterator.getflags
Groups: php.notes 
Request: Send a blank email to php-notes+get-201601@lists.php.net to get a copy of this message
use 'CachingIterator::TOSTRING_USE_INNER' flag <?php class A extends ArrayIterator { public function __toString(){ return 'toString this class'; } } $iterator = new A(array('apple'=>10, 'banana'=>20, 'cat'=>30)); $cache = new CachingIterator($iterator, CachingIterator::TOSTRING_USE_INNER); $cache->next(); $cache->next(); echo $cache; /* output: toString this class */ ?> ---- Server IP: 72.52.91.14 Probable Submitter: 202.104.129.55 ---- Manual Page -- http://php.net/manual/en/cachingiterator.getflags.php Edit -- https://master.php.net/note/edit/116660 Del: integrated -- https://master.php.net/note/delete/116660/integrated Del: useless -- https://master.php.net/note/delete/116660/useless Del: bad code -- https://master.php.net/note/delete/116660/bad+code Del: spam -- https://master.php.net/note/delete/116660/spam Del: non-english -- https://master.php.net/note/delete/116660/non-english Del: in docs -- https://master.php.net/note/delete/116660/in+docs Del: other reasons-- https://master.php.net/note/delete/116660 Reject -- https://master.php.net/note/reject/116660 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201601) next »