← All docs

tidy_parse_string()

Parses a string of HTML, applies the optional configuration and returns a tidy document object.

tidy_parse_string()

function tidy_parse_string(string $string, array|string|null $config = null, ?string $encoding = null): mixed

Parses a string of HTML, applies the optional configuration and returns a tidy document object.

Parameters:

  • $string (string)
  • $config (array|string|null), default null, optional
  • $encoding (?string), default null, optional

Returns: mixed

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how tidy_parse_string is implemented in the compiler, see the internals page.