Instantly share code, notes, and snippets.
Thanks for sharing with this simple, small but awesome snippet
ob_get_contents()and ob_end_clean() can be merge in one call to ob_get_clean()
Based on nsitbon's answer, and further optimization... we can write:
Thanks @nsitbon and @mkormendy! I've updated the gist to simplify it.