Re: __construct __destruct in PHP 4

From: Date: Sun, 28 Jan 2007 14:09:07 +0000
Subject: Re: __construct __destruct in PHP 4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-247910@lists.php.net to get a copy of this message
I have been trying going thru the PHP manual to find if there are any equivalent to the __contruct and __destruct in PHP 4, but I cannot find any solution for this part. I know it was introduced in PHP 5, but as __sleep and __wakeup exist in PHP 4 already I was hoping there is something like __init and __die in PHP 4 :-)
In PHP 4 the constructor has the same name as the class (like C++). See http://us3.php.net/manual/en/language.oop.constructor.php There is no destructor in PHP 4. Larry PS The manual has two sets of OOP documentation: one for PHP 4 & another for PHP 5. Make sure you're viewing the right set.

« previous php.general (#247910) next »