Req #47172 [Opn->Wfx]: new interface suggest
| From: | levim@php.net | Date: | Wed, 14 Nov 2012 01:02:42 +0000 |
| Subject: | Req #47172 [Opn->Wfx]: new interface suggest | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174659@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=47172&edit=1
ID: 47172
Updated by: levim@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