proc_nice
proc_nice
Change the priority of the current process
bool **proc_nice** int $priority
changes the priority of the current
process by the amount specified in . A
positive will lower the priority of the
current process, whereas a negative
will raise the priority.
proc_nice``priority``priority``priority
is not related to
and its associated functions in any way.
proc_nice``proc_open
priorityThe new priority value, the value of this may differ on platforms.
On Unix, a low value, such as means high priority
whereas positive values have a lower priority.
`-20`
For Windows the parameter has the
following meaning:
`priority`
return.success
If an error occurs, like the user lacks permission to change the priority,
an error of level is also generated.
E_WARNING
Voorbeeld: Using to set the process priority to high
<?php
// Highest priority
proc_nice(-20);
?>
Opmerking: > ### Availability
will only exist if your system has 'nice' capabilities. 'nice' conforms to: SVr4, SVID EXT, AT&T, X/OPEN, BSD 4.3.
proc_nice
Opmerking: > ### Windows only
will change the current priority, even if PHP was compiled using thread safety.
proc_niceprocess
pcntl_setpriority