Page 1 of 1

coding question - php and stack

Posted: Fri Dec 16, 2005 4:43 am
by skolar
Is there a problem with calling a function and then redirecting to another page from inside that function? Will this leave the originally called function on the stack waiting for a return value? What if i use exit() right after the call to header("Location:...")?

I'm not sure if the stack is erased/reset when switching different pages/scripts. I appreciate any thoughts on the subject.

Thanks in advance.

Posted: Fri Dec 16, 2005 4:51 am
by onion2k
No problem at all. PHP tidies up after itself very nicely.