1--TEST--
2Unexposed/leaked stream encloses another stream
3--SKIPIF--
4<?php
5if (!function_exists('zend_leak_variable')) die("skip only debug builds");
6--FILE--
7<?php
8$s = fopen('php://temp/maxmemory=1024','wb+');
9
10$t = fopen('php://temp/maxmemory=1024','wb+');
11
12/* force conversion of inner stream to STDIO. */
13$i = 0;
14while ($i++ < 5000) {
15    fwrite($t, str_repeat('a',1024));
16}
17
18zend_leak_variable($s);
19zend_leak_variable($t);
20?>
21--EXPECT--
22