note 50301 added to language.oop5.decon

From: Date: Thu, 24 Feb 2005 09:08:04 +0000
Subject: note 50301 added to language.oop5.decon
Groups: php.notes 
Request: Send a blank email to php-notes+get-85472@lists.php.net to get a copy of this message
To caliban at darklock dot com: Why not just define a dummy constructor <?PHP function __construct() {} ?> in the base class? This adds little overhead, and allows you to both extend the class worry-free and later add construct functionality to the base class. And now, about destructors: I haven't seen this clarified anywhere in the manual, but object destructors are called implicitly at script shutdown for all objects that still exist at that Tpoint. his happens *after* any shutdown functions set with <?PHP register_shutdown_function() ?> have been called. Objects appear to be destructed in the order they were defined, which means you have to be careful with destruct methods that rely on the functionality of other objects (e.g. on a database-handler) as they will have shut down already. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50301 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50301&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50301&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50301&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50301&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50301&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50301&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85472) next »