|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-22 01:29 UTC] didou@php.net
[2020-02-07 06:10 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
Description: ------------ the resource type of the proc_* functions are not documented in both the chapter 'CXXII. Program Execution Functions' as the 'Appendix L. List of Resource Types'. the resource type returned by get_resource_type is 'process'. i included some source-code to get that result. currently in the documentation it says: 'This extension has no resource types defined.'. also on the proc_open page there is not any mention of how the resource is called. this can be tricky if you want to check if you got the right resource. greets, Docey. Reproduce code: --------------- <?php /* */ $cmd = "ipconfig /all"; $pipes = array(); $pipespec = array(); $pipespec[0][0] = "pipe"; $pipespec[0][1] = "r"; $pipespec[1][0] = "pipe"; $pipespec[1][1] = "w"; $pipespec[2][0] = "pipe"; $pipespec[2][1] = "w"; $rc = proc_open($cmd, $pipespec, $pipes); if(is_resource($rc)){ $type = get_resource_type($rc); print("proc_open returns a resource of type '".$type."'."); }else{ print("proc_open did not return a resource."); } proc_close($rc); ?> Expected result: ---------------- the resource type of proc_open wich is not documented. Actual result: -------------- well, so see this updated in both the chapter 'CXXII. Program Execution Functions' as the 'Appendix L. List of Resource Types'.