From: marcot at tabini dot ca
Operating system: Shouldn't matter
PHP version: 5CVS-2003-03-01 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: Private members are available to derived classes
Configure:
./configure \
--with-apxs=/usr/local/apache/bin/apxs
For example:
<?
class a
{
private $c;
function __construct()
{
$this->c = "a::c";
}
}
class b
extends a
{
private $d;
function _construct()
{
$this->d = 'b::d';
}
function test()
{
echo $this->c;
}
}
$b = new b;
//echo $b->d;
$b->test();
?>
If executed, The first echo statement returns an error, as expected. The
$b->test() call, however, returns `a::c', which I think is incorrect, as
it should either not return anything or produce an error, since a::$c is
declared as private and should not be available to the b namespace.
--
Edit bug report at http://bugs.php.net/?id=22489&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22489&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22489&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22489&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22489&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22489&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22489&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22489&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22489&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22489&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22489&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22489&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22489&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22489&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22489&r=gnused