ID: 46693 Comment by: lichunguo at ceopen dot cn Reported By: lichunguo at ceopen dot cn Status: Feedback Bug Type: Scripting Engine problem Operating System: Windows PHP Version: 5.2.6 New Comment:
I have tried, but no solve probleam, as of old. Previous Comments: ------------------------------------------------------------------------ [2008-11-28 12:34:41] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-11-27 02:50:11] lichunguo at ceopen dot cn 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 this bug report at http://bugs.php.net/?id=46693&edit=1