xref: /php-src/tests/output/ob_017.phpt (revision f8d79582)
1--TEST--
2output buffering - statuses
3--INI--
4opcache.optimization_level=0
5--FILE--
6<?php
7$statuses = array();
8function oh($str, $flags) {
9    global $statuses;
10    $statuses[] = "$flags: $str";
11    return $str;
12}
13ob_start("oh", 3);
14echo "yes";
15echo "!\n";
16ob_flush();
17echo "no";
18ob_clean();
19echo "yes!\n";
20echo "no";
21ob_end_clean();
22print_r($statuses);
23?>
24--EXPECT--
25yes!
26yes!
27Array
28(
29    [0] => 1: yes
30    [1] => 4: !
31
32    [2] => 2: no
33    [3] => 0: yes!
34
35    [4] => 10: no
36)
37