tidy::$errorBuffer
PHP function
Edit on GitHub ✎
Return warnings and errors which occurred parsing the specified document
Description
Oop (property):
publicstring|nulltidy->errorBuffer
Procedural:
tidy_get_error_buffer(tidy $tidy): string|false
Returns warnings and errors which occurred parsing the specified document.
Parameters
tidyObject
Return Values
Returns the error buffer as a string, or false if the buffer is empty.
Examples
tidy_get_error_buffer() example
php
<?php
$html = '<p>paragraph</p>';
$tidy = tidy_parse_string($html);
echo tidy_get_error_buffer($tidy);
/* or in OO: */
echo $tidy->errorBuffer;
?>The above example will output:
output
line 1 column 1 - Warning: missing declaration
line 1 column 1 - Warning: inserting missing 'title' element