How can I run a PHP function in background, not a process? For instance, I have to do:
(php code)
1º) retrieve data from database#1
2º) retrieve data from database#2
3º) If #1 and #2 have finished, do my calculations.
Functions #1 and #2 are also PHP code. I don't want to use "exec" or "system", as they are not external processes, they are also PHP code! I imagine there should exist some smart way to run a PHP function or line in the background, just that. Any idea?