|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-17 19:43 UTC] mike@php.net
[2006-08-07 23:25 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
Description: ------------ Private __construct() can be called form inherited class constructor via parent::__construct(); I'm not sure, this was not reported, but I didn't found any this kind. Also in PHP version 5.2 this was occured (not by me). Thx. Reproduce code: --------------- <?php class A{ private function __construct(){} } class B extends A{ public function __construct(){ parent::__construct(); } } $instance=new B(); ?> Expected result: ---------------- Fatal error: Call to private method A::__construct() from context 'B' Actual result: -------------- no error - everything is fine