[Help] PHP Functions
Posted: Sun Oct 18, 2009 9:47 pm
Recently, I have been writing a XML Socket server in PHP...
My problem is this...
In PHP, when you call a custom function it seems to stop whatever is currently happening.
ie:
It will not print hello if you call it after the function. In this example I could simply move hello above the function call, but in my script it would not be that simple.
tl;dr: Is there a way I can call a function, and not have it stop doing whatever it is currently doing.
EDIT: Inside the function there IS a while loop that will go on until something happens to it.
Also, it seems I need a way to multithread these processes... or start new instances of them... or something... halp!
My problem is this...
In PHP, when you call a custom function it seems to stop whatever is currently happening.
ie:
Code: Select all
do_this($test);
print("Hello!");
tl;dr: Is there a way I can call a function, and not have it stop doing whatever it is currently doing.
EDIT: Inside the function there IS a while loop that will go on until something happens to it.
Also, it seems I need a way to multithread these processes... or start new instances of them... or something... halp!