For background run use:
exec("nohup php worker.php >/dev/null 2>/dev/null &");
(PECL gearman >= 0.5.0)
$function_name
, callable $function
, mixed &$context
= ?
, int $timeout
= ?
) : bool
For background run use:
exec("nohup php worker.php >/dev/null 2>/dev/null &");