tidy::getStatus

tidy::getStatus

tidy_get_status

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

tidy::getStatus -- tidy_get_statusGet status of specified document

Description

Object oriented style

int tidy::getStatus ( void )

Procedural style

int tidy_get_status ( tidy $object )

Returns the status for the specified tidy object.

Parameters

object

The Tidy object.

Return Values

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

Examples

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

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/tidy.getstatus.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部