Re: __construct __destruct in PHP 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, January 28, 2007 6:56 am, Peter Lauri wrote:
> 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 :-)

Read the ChangeLog, but as I recall, they were introducted in PHP 5
and simply had no corresponding functionality in PHP 4...

Though you might be able to hack something with __sleep and __wakeup
in some way to detect death and construction.

Actually, construction should not be terribly difficult, as the parent
constructor is always called, so you can do whatever you want in that
instead of in __construct.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux