Php – execute bash script from php without waiting

bashPHP

I execute a bash script from php with shell_exec.
But the php script waits until the shell script is finished.

Can I somehow call the bash script without waiting.
Both:

exec
shell_exec

are waiting until the bash script is finished.
I'm running linux btw.

Best Answer

This has to work:

exec('/your/command /dev/null 2>/dev/null &');