Edit report at https://bugs.php.net/bug.php?id=47172&edit=1
ID: 47172 Updated by: le...@php.net Reported by: info at netmosfera dot it Summary: new interface suggest -Status: Open +Status: Wont fix Type: Feature/Change Request Package: SPL related Operating System: irrelevant PHP Version: 5.3.0alpha3 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2009-01-20 19:43:29] info at netmosfera dot it another useful interface: interface PrintReadable { public printR(); } print_r(new ArrayObject(.....)); useful to improve readability on items like this: ArrayObject Object ( [storage:ArrayObject:private] => Array ( [0] => ArrayObject Object ( [storage:ArrayObject:private] => Array ( [0] => ArrayObject Object ( [storage:ArrayObject:private] => Array ( ) ) ) ) [1] => ciao ) ) ------------------------------------------------------------------------ [2009-01-20 18:34:50] info at netmosfera dot it Description: ------------ hello please read the code! hth Reproduce code: --------------- interface FirstLast //? lol! { public function (Boolean) isFirst(); public function (Boolean) isLast(); } $x= new ArrayObject(Array(1,2,3,4,5,6,7)); // implements this.. foreach($x as $item) { if($x->isFirst()) echo "<ul>"; echo "<li>" . $item . "</li>"; if($x->isLast()) echo "</ul>"; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=47172&edit=1