ID: 40405 Updated by: [EMAIL PROTECTED] Reported By: ar3121 at att dot com -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment:
The example is correct. 09/02/2007 11:00:05 C:\>php -n <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> ^Z A 'quote' is <b>bold</b>A 'quote' is <b>bold</b> Previous Comments: ------------------------------------------------------------------------ [2007-02-08 17:12:17] ar3121 at att dot com Description: ------------ On the htmlentities function documentation page: http://us2.php.net/htmlentities Example 2262 is incorrect. The function call with and without ENT_QUOTES produces different results, but the documentation says they're the same. Expected result: ---------------- <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> Actual result: -------------- <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40405&edit=1
