Bug #12277 Updated: in PHP4 constructors still seem to behave like in PHP3

From: Date: Sat, 17 Nov 2001 18:42:30 +0000
Subject: Bug #12277 Updated: in PHP4 constructors still seem to behave like in PHP3
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70747@lists.php.net to get a copy of this message
ID: 12277 Updated by: mfischer Reported By: jack@mobil.cz Old Status: Open Status: Closed Bug Type: Class/Object related Operating System: All PHP Version: 4.0.5 New Comment: This is a current implementation limitation. Just define your real C constructor and access the other C method with parent::C(). Closed. Previous Comments: ------------------------------------------------------------------------ [2001-07-20 07:51:42] jack@mobil.cz the following code: <? class A { function A() { echo "I am the constructor of A.<br>\n"; } } class B extends A { function C() { echo "I am a regular function C.<br>\n"; } } class C extends B { } $b = new C(); ?> in PHP 4.0.5 prints: I am a regular function C.<br> is this correct? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12277&edit=1

« previous php.dev (#70747) next »