Re: note 11320 added to Classes and Objects

From: Date: Fri, 16 Feb 2001 02:25:58 +0000
Subject: Re: note 11320 added to Classes and Objects
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-11127@lists.php.net to get a copy of this message
The notes should not be the place to ask for support, help, etc. but the one to add comments/examples to the manual entries. See www.php.net/support.php for the appropriate resources --- geekmeister@yahoo.com wrote: > I must be missing something, because I can't find > any references in the documentation to two items: > > 1. Class Destructors - this is called when an object > goes out of scope or is deallocated. No such construct in PHP, you can remove an object by just using unset($obj), or by assigning to the variable that contained it: $obj = ""; > > 2. How to cause a constructor to fail. For example, > if I want to have a constructor function that opens > a file, but the fopen() command fails, I might want > the constructor function to somehow return NULL or 0 > or something that would indicate that the > construction of the object failed. Use a "return null" or something of that sort in your constructor. See examples in the PEAR code (pear dir in your source distribution) > > Any information on these two items? Thanks. Ask in the mailing lists for more details on this and other topics. Your note will be removed > > http://www.php.net/manual/en/language.oop.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

« previous php.notes (#11127) next »