array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.tidy-warning-count.php', 1 => 'tidy_warning_count', ), 'up' => array ( 0 => 'ref.tidy.php', 1 => 'Tidy Funktionen', ), 'prev' => array ( 0 => 'function.tidy-get-output.php', 1 => 'tidy_get_output', ), 'next' => array ( 0 => 'book.tokenizer.php', 1 => 'Tokenizer', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/tidy/functions/tidy-warning-count.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8, PECL tidy >= 0.5.2)
tidy_warning_count — Returns the Number of Tidy warnings encountered for specified document
Returns the number of Tidy warnings encountered for the specified document.
Returns the number of warnings.
Beispiel #1 tidy_warning_count() example
<?php
$html = '<p>test</i>
<bogustag>bogus</bogustag>';
$tidy = tidy_parse_string($html);
echo tidy_error_count($tidy) . "\n"; //1
echo tidy_warning_count($tidy) . "\n"; //5
?>