ID:               47172
 Comment by:       info at netmosfera dot it
 Reported By:      info at netmosfera dot it
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: irrelevant
 PHP Version:      5.3.0alpha3
 New Comment:

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
        )

)


Previous Comments:
------------------------------------------------------------------------

[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 http://bugs.php.net/?id=47172&edit=1

Reply via email to