PHP 8.4.0 RC4 available for testing

tidy::getStatus

tidy_get_status

(PHP 5, PHP 7, PHP 8, PECL tidy >= 0.5.2)

tidy::getStatus -- tidy_get_statusGet status of specified document

Beschreibung

Objektorientierter Stil

public tidy::getStatus(): int

Prozeduraler Stil

tidy_get_status(tidy $tidy): int

Returns the status for the specified tidy tidy.

Parameter-Liste

tidy

Das Tidy Objekt.

Rückgabewerte

Returns 0 if no error/warning was raised, 1 for warnings or accessibility errors, or 2 for errors.

Beispiele

Beispiel #1 tidy::getStatus() example

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

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top