stream_enclosed.phpt 375 B

1234567891011121314151617181920
  1. --TEST--
  2. Unexposed/leaked stream encloses another stream
  3. --EXTENSIONS--
  4. zend_test
  5. --FILE--
  6. <?php
  7. $s = fopen('php://temp/maxmemory=1024','wb+');
  8. $t = fopen('php://temp/maxmemory=1024','wb+');
  9. /* force conversion of inner stream to STDIO. */
  10. $i = 0;
  11. while ($i++ < 5000) {
  12. fwrite($t, str_repeat('a',1024));
  13. }
  14. zend_leak_variable($s);
  15. zend_leak_variable($t);
  16. ?>
  17. --EXPECT--