Re: exit in class constructor crashes
| From: | Daniel Convissor | Date: | Mon, 31 Jul 2000 15:23:09 +0000 |
| Subject: | Re: exit in class constructor crashes | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9181@lists.php.net to get a copy of this message | ||
Hi Again:
Daniel Convissor wrote:
>
> That's all from me on this subject, unless asked.
Okay, I lied.
Here's the latest. Using eval() does the same thing as using the fakeout
inlcude. Even better, the code is all contained in the same file! So here's
the new deal:
<?php
class ConstructorExit {
function ConstructorExit() {
echo "Welcome to the Constructor Exit Test.";
$this->SomeSubFunction();
echo "<br>Do note, for some reason, you'll see this.";
}# End of function ConstructorExit
function SomeSubFunction() {
echo "<br>Well, you're now in the sub-function.";
$Problem = "1";
if ($Problem) {
eval("} } exit();");
}
echo "<br>If you see this, the sub-function didn't exit.";
}# End of SomeSubFunction
}# End of class ConstructorExit
$Post = new ConstructorExit;
echo "<br>This should not be seen.";
?>
NOW, I'm content. Have a good week!
--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