Annotation of embedaddon/php/ext/standard/tests/file/stream_enclosed.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Unexposed/leaked stream encloses another stream
! 3: --SKIPIF--
! 4: <?php
! 5: if (!function_exists('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;
! 14: while ($i++ < 5000) {
! 15: fwrite($t, str_repeat('a',1024));
! 16: }
! 17:
! 18: leak_variable($s, true);
! 19: leak_variable($t, true);
! 20: --EXPECT--
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>