So whats so good about __construct()?
View Single Post
11-26-2007, 09:18 PM
Join Date: Oct 2007
Location: Manchester, UK
The reason the class-name-function was replaced by __construct() is to be more a genuine OOP language.
What about C++, that has its constructors like PHP4 as does Java, i.e. C++
Personally i think they did it just to confuse people :), or as you say the class name is hideously long.
Just as a note a destructor in C++ is
. (not sure about Java, something in my mind is saying finalize() but don't trust that as fact coz i ain't a Java programmer :), ill have to ask my m8 about that. )
PHP4 didn't have a native destructor method, unless you bodge something together with register_shutdown_function as wildhoney said.
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 11-27-2007 at
View Public Profile
Send a private message to sketchMedia
Visit sketchMedia's homepage!
Find More Posts by sketchMedia