(PHP 4, PHP 5, PHP 7, PHP 8)
pclose — 关闭进程文件指针
返回运行的进程的终止状态。发生错误时会返回 -1
。
示例 #1 pclose() 例子
<?php
$handle = popen('/bin/ls', 'r');
pclose($handle);
?>
注意: Unix Only:
proc_close() is internally implemented using the
waitpid(3)
system call. To obtain the real exit status code the pcntl_wexitstatus() function should be used.