if you use ob_start with a callback function as a parameter, and that function changes ob string (as in example in manual) don't expect that ob_get_contents will return changed ob.it will work as you would use ob_start with no parameter at all. So don't be confused.

Note that, unlike PHP variables which make efficient use of memory, getting the contents of the output buffer results in a new copy of the buffer being made. This can end up massively increasing the memory requirements of your script if your output is large.