Doc #60602 [Opn]: $env can be destructively changed.
| From: | me at ktamura dot com | Date: | Fri, 23 Dec 2011 16:48:01 +0000 |
| Subject: | Doc #60602 [Opn]: $env can be destructively changed. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7708@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60602&edit=1
ID: 60602
User updated by: me at ktamura dot com
Reported by: me at ktamura dot com
Summary: $env can be destructively changed.
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: OSX 10.6.8
PHP Version: 5.4SVN-2011-12-23 (SVN)
Block user comment: N
Private report: N
New Comment:
the "../futz/a.php" in the expected/actual output is the script's name.
Previous Comments:
------------------------------------------------------------------------
[2011-12-23 16:27:45] me at ktamura dot com
Description:
------------
---
From manual page: http://www.php.net/function.proc-open#refsect1-function.proc-
open-description
---
The $env argument can be destructively changed as a result of calling proc_open.
We should either document so or change the behavior of the function so that $env's
values are not changed as a result of invoking proc_open.
Test script:
---------------
<?php
print_r($_SERVER['argv']);
$pipes = array();
proc_open('/bin/echo', array(), $pipes, null, $_SERVER);
print_r($_SERVER['argv']);
Expected result:
----------------
Array
(
[0] => ../futz/a.php
)
Array
(
[0] => ../futz/a.php
)
Actual result:
--------------
Array
(
[0] => ../futz/a.php
)
Array
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60602&edit=1