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