php8.5
Home/ Manual/ tidy / functions/ ob_tidyhandler

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

input

The buffer.

mode

The 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>

See Also

Source: reference/tidy/functions/ob-tidyhandler.xml · from the official PHP manual (php/doc-en)