ID:          40405
 Updated by:  [EMAIL PROTECTED]
 Reported By: ar3121 at att dot com
 Status:      Open
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

Hmmm.

The most recently built Windows CHM and Extended CHM files show this
correctly. The CVS was last changed in 2003, so this means that the web
building mechanism is at fault somewhere.

But the page was last built in Dec 2006. It may need a rebuild.

I'll try and get this done.



Previous Comments:
------------------------------------------------------------------------

[2007-02-09 15:05:54] ar3121 at att dot com

Look closer... the actual html you just posted does not match the
example.

Maybe it would help if you focused on just the second half of the
example:

<?php
$str = "A 'quote' is <b>bold</b>";

// Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str, ENT_QUOTES);
?>

------------------------------------------------------------------------

[2007-02-09 11:00:18] [EMAIL PROTECTED]

If you run the code through a browser (I'm using FF on WinXP), then the
screen shows ...

A 'quote' is <b>bold</b>A 'quote' is <b>bold</b>

But if you look at the actual HTML ...

A 'quote' is &lt;b&gt;bold&lt;/b&gt;A &#039;quote&#039; is
&lt;b&gt;bold&lt;/b&gt;

Which matches the example.

------------------------------------------------------------------------

[2007-02-09 10:57:54] [EMAIL PROTECTED]

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 &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str);

// Outputs: A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str, ENT_QUOTES);
?>
^Z
A 'quote' is &lt;b&gt;bold&lt;/b&gt;A &#039;quote&#039; is
&lt;b&gt;bold&lt;/b&gt;

------------------------------------------------------------------------

[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 &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str);

// Outputs: A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str, ENT_QUOTES);
?> 

Actual result:
--------------
<?php
$str = "A 'quote' is <b>bold</b>";

// Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str);

// Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str, ENT_QUOTES);
?> 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40405&edit=1

Reply via email to