php修改进程名称的方法:【if (function_exists('cli_set_process_title')) {cli_set_process_title("superman php master process");...】。

本文操作环境:windows10系统、php 7、thinkpad t480电脑。
在cli环境下php如何设置进程名称呢?让我们一起来看下吧。
具体实现代码如下:
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");
}一般是在用php做多进程处理时可能会用到
立即学习“PHP免费学习笔记(深入)”;

推荐学习:php培训











