import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-strings / htmlspecialchars_decode_error.php
bloba1b8f70c16617557ff5e7691f23136645973912b
1 <?php
2 /* Prototype : string htmlspecialchars_decode(string $string [, int $quote_style])
3 * Description: Convert special HTML entities back to characters
4 * Source code: ext/standard/html.c
5 */
7 echo "*** Testing htmlspecialchars_decode() : error conditions ***\n";
9 // Zero arguments
10 echo "\n-- Testing htmlspecialchars_decode() function with Zero arguments --\n";
11 var_dump( htmlspecialchars_decode() );
13 //Test htmlspecialchars_decode with one more than the expected number of arguments
14 echo "\n-- Testing htmlspecialchars_decode() function with more than expected no. of arguments --\n";
15 $string = "<html>hello &amp; &gt; &lt; &quot; &#039; world</html>";
16 $quote_style = ENT_COMPAT;
17 $extra_arg = 10;
18 var_dump( htmlspecialchars_decode($string, $quote_style, $extra_arg) );
20 echo "Done";