What is the function `html_entity_decode()` used for in PHP?

The `html_entity_decode()` function in PHP is used to convert HTML entities back to their corresponding characters. This is useful when you have HTML-encoded text that you want to display as plain text on a webpage. For example, if you have text with entities like `&lt;`, `&gt;`, or `&amp;`, `html_entity_decode()` will convert them back to `<`, `>`, and `&` respectively.

// Example usage of html_entity_decode()
$html_encoded_text = &quot;&amp;lt;p&amp;gt;Hello, &amp;amp;world&amp;amp; &amp;lt;/p&amp;gt;&quot;;
$decoded_text = html_entity_decode($html_encoded_text);
echo $decoded_text;
// Output: &lt;p&gt;Hello, &amp;world&amp; &lt;/p&gt;