PHP spawn process
Use this code:
<?php exec('nohup /usr/bin/my-command > /dev/null 2>&1 &'); ?>
This forks the sub-process into the background and writes all of the output into /dev/null
. That way PHP continues executing the script as if there won't be any output it has to wait for.