Home>Article>Backend Development> How to modify the process name in php
How to modify the process name in php: [if (function_exists('cli_set_process_title')) {cli_set_process_title("superman php master process");...].
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
How to set the process name in php in cli environment? Let’s take a look.
The specific implementation code is as follows:
if (function_exists('cli_set_process_title')) { cli_set_process_title("superman php master process"); } // Need proctitle when php<=5.5 . elseif (extension_loaded('proctitle') && function_exists('setproctitle')) { setproctitle("superman php master process"); }
Generally it may be used when using php for multi-process processing
Recommended learning:php training
The above is the detailed content of How to modify the process name in php. For more information, please follow other related articles on the PHP Chinese website!