ob_tidyhandler
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
ob_start callback function to repair the buffer
Description
ob_tidyhandler(string $input, [int $mode]): string
Callback function for ob_start() to repair the buffer.
Parameters
inputThe buffer.
modeThe buffer mode.
Return Values
Returns the modified buffer.
Examples
ob_tidyhandler() example
php
<?php
ob_start('ob_tidyhandler');
echo '<p>test</i>';
?>The above example will output:
output
<html>
<head>
<title></title>
</head>
<body>
<p>test</p>
</body>
</html>