tidy_get_status

(PHP 5, PECL tidy:0.5.2-1.2)

tidy_get_status — Retourne le statut du document spécifié

Description

Style procédural

int tidy_get_status ( tidy $object )

Style orienté objet (méthode)

int tidy->getStatus ( void )

tidy_get_status() retourne le statut de l'objet object Tidy spécifié. Elle retourne 0 si aucune erreur/avertissement n'a été rencontrée, 1 pour les avertissements d'accessibilité, et 2 pour les erreurs.

Exemple 2725. Exemple avec tidy_get_status()

<?php
$html 
'<p>paragraphe</i>' ;
$tidy  tidy_parse_string ( $html );
 
$html2  '<bogus>test</bogus>' ;
$tidy2  tidy_parse_string ( $html2 );
  
echo 
tidy_get_status ( $tidy );  //1

echo  tidy_get_status ( $tidy2 );  //2
?>