Re: PHP4 and Constructor
| From: | Chris | Date: | Thu, 04 Oct 2007 04:18:06 +0000 |
| Subject: | Re: PHP4 and Constructor | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44132@lists.php.net to get a copy of this message | ||
T K wrote:
Hi, I would like to use constructor in PHP4, but how do you make a constructor?Name the function the same as the class. class ABC { function ABC() {
//constructor in php4
$this->__construct(); // just call the php5 one.
}
function __construct() {
//constructor in php5.} } -- Postgresql & php tutorials http://www.designmagick.com/