Req #44448 [Fbk->NoF]: base class constructor will remain unaffected by calling an successor obj.

From: Date: Tue, 30 Dec 2014 10:41:29 +0000
Subject: Req #44448 [Fbk->NoF]: base class constructor will remain unaffected by calling an successor obj.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189381@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=44448&edit=1 ID: 44448 Updated by: php-bugs@lists.php.net Reported by: office at bas-x dot de Summary: base class constructor will remain unaffected by calling an successor obj. -Status: Feedback +Status: No Feedback Type: Feature/Change Request Package: *General Issues Operating System: Windows XP PHP Version: 5.2.5 Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2014-11-02 01:14:48] requinix@php.net I can't figure out what this is trying to ask for. Parent constructor isn't called if the child doesn't call it explicitly? Yes it is. Can't access $this->test in the child? Correct because it's a private property of the parent. ------------------------------------------------------------------------ [2008-03-16 17:26:06] office at bas-x dot de Description: ------------ Obviously, the constructor of a base class will remain unaffected when calling an successor object. It should be a very essential feature. Because, also base classes maybe needs private initiations. Reproduce code: --------------- Class Base { private $test; function __construct ( $moduleData ) { $test = "Hello World"; } } Class Successor extends Base { echo $this->test; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=44448&edit=1

« previous php.bugs (#189381) next »