1--TEST--
2Bug #72306 (Heap overflow through proc_open and $env parameter)
3--FILE--
4<?php
5class moo {
6    public $a;
7    function __construct() { $this->a = 0; }
8    function __toString() { return $this->a++ ? str_repeat("a", 0x8000) : "a"; }
9}
10
11$env = array('some_option' => new moo());
12$pipes = array();
13$description = array(
14   0 => array("pipe", "r"),
15   1 => array("pipe", "w"),
16   2 => array("pipe", "r")
17);
18
19$process = proc_open('nothing', $description, $pipes, NULL, $env);
20
21?>
22okey
23--EXPECT--
24okey
25