Parents constructor

From: Date: Fri, 24 Mar 2006 05:40:24 +0000
Subject: Parents constructor
Groups: php.general 
Request: Send a blank email to php-general+get-232519@lists.php.net to get a copy of this message
Hi, I have a class B that extends class A. I want to call constructor of A correctly, how to do that. This is how I tried: Class B extends A { Function B($Bvariable) { Parent::A($Bvariable); } } Class A { Function A($Avariable) { Dostuff... } } It does not seem correct, maybe I am correct, but I do not feel correct. /Peter

« previous php.general (#232519) next »