File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
lang /
bug24951.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 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,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #24951 (ob_flush() destroys output handler)
3: --FILE--
4: <?php
5: function test($s, $mode)
6: {
7: return (($mode & PHP_OUTPUT_HANDLER_START)?"[":"") . $s . (($mode & PHP_OUTPUT_HANDLER_END)?"]\n":"");
8: }
9: function t1()
10: {
11: ob_start("test");
12: echo "Hello from t1 1 ";
13: echo "Hello from t1 2 ";
14: ob_end_flush();
15: }
16: function t2()
17: {
18: ob_start("test");
19: echo "Hello from t2 1 ";
20: ob_flush();
21: echo "Hello from t2 2 ";
22: ob_end_flush();
23: }
24: function t3()
25: {
26: ob_start("test");
27: echo "Hello from t3 1 ";
28: ob_clean();
29: echo "Hello from t3 2 ";
30: ob_end_flush();
31: }
32:
33: t1(); echo "\n";
34: t2(); echo "\n";
35: t3(); echo "\n";
36: ?>
37: --EXPECT--
38: [Hello from t1 1 Hello from t1 2 ]
39:
40: [Hello from t2 1 Hello from t2 2 ]
41:
42: Hello from t3 2 ]
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>