ID:               30704
 Updated by:       [EMAIL PROTECTED]
 Reported By:      info at rhalff dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux
 PHP Version:      5.0.2
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.


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

[2004-11-06 17:06:37] info at rhalff dot com

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 this bug report at http://bugs.php.net/?id=30704&edit=1

Reply via email to