File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
output /
bug60768.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 4 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
1: --TEST--
2: Bug #60768 Output buffer not discarded
3: --FILE--
4: <?php
5:
6: global $storage;
7:
8: ob_start(function($buffer) use (&$storage) { $storage .= $buffer; }, 20);
9:
10: echo str_repeat("0", 20); // fill in the buffer
11:
12: for($i = 0; $i < 10; $i++) {
13: echo str_pad($i, 9, ' ', STR_PAD_LEFT) . "\n"; // full buffer dumped every time
14: }
15:
16: ob_end_flush();
17:
18: printf("Output size: %d, expected %d\n", strlen($storage), 20 + 10 * 10);
19:
20: ?>
21: DONE
22: --EXPECT--
23: Output size: 120, expected 120
24: DONE
25:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>