1--TEST--
2Test ob_start() with callbacks in variables
3--FILE--
4<?php
5
6// Closure in variable
7$a = function ($s) { return strtoupper($s); };
8ob_start($a);
9echo 'closure in variable', "\n";
10ob_end_flush();
11
12// Object (array) in variable
13class foo {
14    static function out($foo) {
15        return strtoupper($foo);
16    }
17}
18$a = array('foo', 'out');
19ob_start($a);
20echo 'object in variable', "\n";
21ob_end_flush();
22
23// Object with static array
24ob_start(array('foo', 'out'));
25echo 'object via static array', "\n";
26ob_end_flush();
27
28function my_strtoupper($foo, $bar) {
29    return strtoupper($foo);
30}
31$a = 'my_strtoupper';
32ob_start($a);
33echo 'function via variable', "\n";
34ob_end_flush();
35?>
36--EXPECT--
37CLOSURE IN VARIABLE
38OBJECT IN VARIABLE
39OBJECT VIA STATIC ARRAY
40FUNCTION VIA VARIABLE
41