1--TEST--
2Function -- htmlspecialchars_decode
3--SKIPIF--
4<?php if (function_exists('htmlspecialchars_decode')) { echo 'skip'; } ?>
5--FILE--
6<?php
7require_once 'PHP/Compat.php';
8PHP_Compat::loadFunction('htmlspecialchars_decode');
9
10$text = 'Text &amp; &quot; &#039; &lt; &gt; End Text';
11echo $text, "\n";
12echo htmlspecialchars_decode($text), "\n";
13echo htmlspecialchars_decode($text, ENT_COMPAT), "\n";
14echo htmlspecialchars_decode($text, ENT_QUOTES), "\n";
15echo htmlspecialchars_decode($text, ENT_NOQUOTES), "\n";
16
17?>
18--EXPECT--
19Text &amp; &quot; &#039; &lt; &gt; End Text
20Text & &quot; &#039; < > End Text
21Text & " ' < > End Text
22Text & " ' < > End Text
23Text & &quot; &#039; < > End Text