- ob_get_clean: documentation ( source)
- var_dump: documentation ( source)
- ob_start: documentation ( source)
- ob_get_contents: documentation ( source)
<?php
$buffer = -1;
function callback($output)
{
global $buffer;
$buffer = $output;
return 'R';
}
ob_start('callback');
echo 'hello';
$a = ob_get_contents();
$b = ob_get_clean();
echo $a;
echo $b;
var_dump($buffer);