exec()
will block until the process you're exec'ing has completed - in otherwords, you're basically running your 'test.php' as a subroutine. At bare minimum you need to add a &
to the command line arguments, which would put that exec()'d process into the background:
exec("php test.php {$test['id']} &");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…