Is it possible to end the outermost function from an inner function?
- From: "-Lost" <maventheextrawords@xxxxxxxxxx>
- Date: Tue, 30 Sep 2008 03:07:19 -0500
Is it possible to end the outermost function from an inner
function?
I've been tasked with implementing a feature check in some existing
code and I wondered if this could be done:
function HorribleCode()
{
TypeCheck(); // if GoodCode_Data is returned, "end" HorribleCode
()
return HorribleCode_Data;
}
function TypeCheck()
{
if (HorribleCode_Data == 'bad')
{
return GoodCode_Data;
}
}
Is this possible without implementing an if-else within
HorribleCode()?
For the, "Why would you want to do this?" crowd, I don't per se,
I'm just curious if it can be done and if so, how?
Thanks for your help!
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
.
- Follow-Ups:
- Re: Is it possible to end the outermost function from an inner function?
- From: Erwin Moller
- Re: Is it possible to end the outermost function from an inner function?
- Prev by Date: Re: html forms and spam-bots
- Next by Date: Installing zend fraemwork on Xampp *******Caution Newbie*************
- Previous by thread: Is there a SAPI module for PHP 5 for supporting the thttpd web server?
- Next by thread: Re: Is it possible to end the outermost function from an inner function?
- Index(es):