tidy::getStatus
PHP function
Edit on GitHub ✎
Get status of specified document
Description
Oop
tidy::getStatus(): int
Procedural
tidy_get_status(tidy $tidy): int
Returns the status for the specified tidy tidy.
Parameters
tidyObject
Return Values
Returns 0 if no error/warning was raised, 1 for warnings or accessibility errors, or 2 for errors.
Examples
tidy::getStatus() example
php
<?php
$html = '<p>paragraph</i>';
$tidy = new tidy();
$tidy->parseString($html);
$tidy2 = new tidy();
$html2 = '<bogus>test</bogus>';
$tidy2->parseString($html2);
echo $tidy->getStatus(); //1
echo $tidy2->getStatus(); //2
?>