- ob_start: documentation ( source)
- ob_get_contents: documentation ( source)
- ob_end_clean: documentation ( source)
<?php
function echoTest() {
ob_start();
echo 'function';
}
echo 'I am in a ' . echoTest();
echo ob_get_contents();
ob_end_clean();