coding question - php and stack

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
skolar
Forum Newbie
Posts: 11
Joined: Mon May 09, 2005 12:36 pm

coding question - php and stack

Post 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.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

No problem at all. PHP tidies up after itself very nicely.
Post Reply