#11973 [Com]: Parent's constructor uncallable directly from within child's methods.

From: Date: Tue, 20 Jul 2004 15:09:02 +0000
Subject: #11973 [Com]: Parent's constructor uncallable directly from within child's methods.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-63023@lists.php.net to get a copy of this message
ID: 11973 Comment by: best-nasty1479 at hotmail dot com Reported By: ori at corky dot net Status: Bogus Bug Type: Class/Object related Operating System: Windows 2000 Professional PHP Version: 4.0.5 New Comment: <a href=http://best-nasty-pvcfisti.da.ru>best nasty</a> Previous Comments: ------------------------------------------------------------------------ [2001-07-09 09:16:49] brianlmoon@php.net Try $this->A(); Brian. ------------------------------------------------------------------------ [2001-07-09 07:43:58] ori at corky dot net Calling a parent class's constructor from a child's method does not work without the parent:: operator, although the parent's constructor is listed in the child's list of method as reported by get_class_methods(). Example script: <?PHP class A { function A() { } } class B extends A { function foo() { A(); } } $obj = new B; $obj->foo(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11973&edit=1

« previous php.bugs (#63023) next »