← All docs

pcntl_setpriority()

Changes a process, process-group, or user scheduling priority.

pcntl_setpriority()

function pcntl_setpriority(int $priority, int $process_id = null, int $mode = 0): bool

Changes a process, process-group, or user scheduling priority.

Parameters:

  • $priority (int)
  • $process_id (int), default null, optional
  • $mode (int), default 0, optional

Returns: bool

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how pcntl_setpriority is implemented in the compiler, see the internals page.