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