Regarding the return value:
"Returns the termination status of the process that was run. In case of an error then -1 is returned. "
and the note about the exit status: "pclose() is internally implemented using the waitpid(3) system call. To obtain the real exit status code the pcntl_wexitstatus() function should be used."
The documentation of the return value is, at best, misleading. The function returns, as does proc_close():
* -1 on error,
* WEXITSTATUS(status) if WIFEXITED(status) is true, or
* status if WIFEXITED(status) is false,
where status is the status parameter of waitpid().
This makes it impossible to differentiate between a relatively normal exit or a termination by signal, and reduces the value of the proc_close return code to a binary one (ok / something broke).
This can be seen in proc_open_rsrc_dtor() in ext/standard/proc_open.c (PHP 5.4.44, 5.6.12).
The note advising the use of pcntl_wexitstatus is plain wrong. One cannot use pcntl_wexitstatus because it already has been used.