How can the exec() function be used in PHP to start a program in the background?

To start a program in the background using the exec() function in PHP, you can append the command with " > /dev/null 2>&1 &". This will redirect the output to /dev/null, detach the process from the current shell, and run it in the background.

$command = 'your_program_command > /dev/null 2>&1 &';
exec($command);