1--TEST--
2proc_open does not leak memory when called with wrong resource type in descriptorspec
3--FILE--
4<?php
5    $context = stream_context_create();
6    try {
7      proc_open('not_a_real_command_but_I_dont_care', array(0 => $context), $pipes);
8      echo "Not reached";
9    } catch (TypeError $e) {
10      echo $e->getMessage(), "\n";
11    }
12?>
13--EXPECT--
14proc_open(): supplied resource is not a valid stream resource
15