ID:               24837
 Updated by:       [EMAIL PROTECTED]
 Reported By:      redeye at erisx dot de
-Status:           Open
+Status:           Verified
 Bug Type:         Zend Engine 2 problem
 Operating System: *
-PHP Version:      5.0.0b1 (beta1)
+PHP Version:      5CVS-2003-11-29


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

[2003-07-28 02:39:49] redeye at erisx dot de

Description:
------------
Using a foreach ( or while ) loop to print the
content of an object should to my understanding
skip private and protected values ( or methods ).

Actually these values are returned but missing
their respective keys, so at least their source
is hidden.

Reproduce code:
---------------
<pre><?php

class test {
    private   $foo = 'test foo';
    private   $bar = 'test bar';
    protected $foobar = 'test foobar';
}

$test = new test;
foreach ( $test AS $key => $val ){
    echo $key." => ".$val."\r\n";
}

?></pre>

Expected result:
----------------
empty page :)

Actual result:
--------------
 => test foo
 => test bar
 => test foobar


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24837&edit=1

Reply via email to