You could start your php script from the command line (i.e. bash) by using
nohup php myscript.php &
the &
puts your process in the background.
Edit:
Yes, there are some drawbacks, but not possible to control? That's just wrong.
A simple kill processid
will stop it. And it's still the best and simplest solution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…