From:             lichunguo at ceopen dot cn
Operating system: Windows
PHP version:      5.2.6
PHP Bug Type:     *Compile Issues
Bug description:  inherit Parent's  private, not report error

Description:
------------
 Class b extends Class A, But Class A __construct is proviate

Reproduce code:
---------------
cclass a {

        public static function singles()
        {
                return new a;
        }

        private function __construct(){}

        public function test()
        {
                $class = 'b';
                return new $class;
        }
}

class b extends a {
        
        public function getstr()
        {
                echo 'aaaaa';
        }
}

$b = a::singles();
$obj = $b->test();
$obj->getstr();

Expected result:
----------------
Fatal error: Call to private a::__construct() from context 'a'

Because Class b extends Class A, But Class A __construct is proviate.

Actual result:
--------------
Run above code:
Windows: aaaaa
Linux: Fatal error: Call to private a::__construct() from context 'a' in
/data0/www/www/ui/member/receive.php on line 53

Why windows's result is ?

-- 
Edit bug report at http://bugs.php.net/?id=46693&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46693&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46693&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46693&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46693&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46693&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46693&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46693&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46693&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46693&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46693&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46693&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46693&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46693&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46693&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46693&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46693&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46693&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46693&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46693&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46693&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46693&r=mysqlcfg

Reply via email to