setproctitle
(PECL proctitle >= 0.1.0)
setproctitle — Set the process title
Description
setproctitle ( string $title ) : void
Sets the process title of the current process.
Parameters
-
title
-
The title to use as the process title.
Return Values
No value is returned.
Examples
Example #1 setproctitle() example
Running the example below will change the process title (visible with ps a
for example).
<?php setproctitle("myscript"); ?>
The above example will output something similar to:
$ ps a PID TTY STAT TIME COMMAND 1168 pts/3 S 0:00 myscript
See Also
- cli_set_process_title() - Sets the process title
- pcntl_fork() - Forks the currently running process
- setthreadtitle() - Set the thread title
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.setproctitle.php