International PHP Conference Munich 2025

tidy::html

tidy_get_html

(PHP 5, PHP 7, PHP 8, PECL tidy 0.5.2-1.0.0)

tidy::html -- tidy_get_htmlRetorna um objeto tidyNode começando pela tag <html> da árvore de análise tidy

Descrição

Estilo orientado a objetos

public tidy::html(): ?tidyNode

Estilo procedural

tidy_get_html(tidy $tidy): ?tidyNode

Retorna um objeto tidyNode começando pela tag <html> da árvore de análise tidy.

Parâmetros

tidy

Um objeto Tidy.

Valor Retornado

Retorna o objeto tidyNode.

Exemplos

Exemplo #1 Exemplo de tidy::html()

<?php
$html
= '
<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>'
;

$tidy = tidy_parse_string($html);

$html = $tidy->html();
echo
$html->value;
?>

O exemplo acima produzirá:

<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>

Veja Também

  • tidy::body() - Retorna um objeto tidyNode começando pela tag <body> da árvore de análise tidy
  • tidy::head() - Retorna um objeto tidyNode começando pela tag <head> da árvore de análise tidy
adicione uma nota

Notas Enviadas por Usuários (em inglês)

Não há notas de usuários para esta página.
To Top