← All docs

tidy_repair_string()

Repairs a string of HTML and returns the repaired markup.

tidy_repair_string()

function tidy_repair_string(string $string, array|string|null $config = null, ?string $encoding = null): string|false

Repairs a string of HTML and returns the repaired markup.

Parameters:

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

Returns: string|false

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

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

Internals

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