Re: exit in class constructor crashes
| From: | Daniel Convissor | Date: | Fri, 28 Jul 2000 21:34:54 +0000 |
| Subject: | Re: exit in class constructor crashes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8866@lists.php.net to get a copy of this message | ||
Heya:
Dennis Gearon wrote:
>
> One thing I noticed in 'PHPLIB' is that they set a variable in the
> instantiated object with the constructor, then checked for it
> immediately after instantiating the object.
But, then the process isn't automatic anymore. The user needs to type in
another line of code. If they don't use that line of code, the check doesn't
happen. :(
Hmm. If one can't exit in the constructor, is there some way to pipe the
rest of the output to /dev/null or something rather than spit it out to the
browser?
> I have a question related to this. Is it possible to issue "return;"
> with no value to leave a function?
Yes. In fact, it's handy for breaking out of a function when you don't want
it to run through its whole process due to some condition that came up.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409