From: info at rhalff dot com
Operating system: Linux
PHP version: 5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description: duplicate properties
Description:
------------
Property is declared twice, see below..
Reproduce code:
---------------
<?php
abstract class Base {
private $var;
function __construct()
{
$this->initAttributes();
$this->doit();
}
final private function initAttributes( )
{
$this->var = false;
}
abstract protected function doit();
}
class Ext extends Base {
protected function doit()
{
$this->var = 1;
}
}
class Bla {
static private $instance = false;
static function instance() {
Bla::$instance = new Ext();
return Bla::$instance;
}
}
$bla = Bla::instance();
var_dump($bla);
?>
Expected result:
----------------
object(Ext)#1 (2) {
["var:private"]=>
int(1)
}
Actual result:
--------------
object(Ext)#1 (2) {
["var:private"]=>
bool(false)
["var"]=>
int(1)
}
--
Edit bug report at http://bugs.php.net/?id=30704&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30704&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30704&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30704&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30704&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30704&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30704&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30704&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30704&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30704&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30704&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30704&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30704&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30704&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30704&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30704&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30704&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30704&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30704&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30704&r=mysqlcfg