Bug #13699 Updated: when using single quotes, print/printf prints literal "\n"
| From: | mfischer@php.net | Date: | Tue, 16 Oct 2001 23:51:31 +0000 |
| Subject: | Bug #13699 Updated: when using single quotes, print/printf prints literal "\n" | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-68081@lists.php.net to get a copy of this message | ||
ID: 13699
Updated by: mfischer
Reported By: beckman@purplecow.com
Old Status: Open
Status: Bogus
Bug Type: Output Control
Operating System: FreeBSD 4.1
PHP Version: 4.0.6
New Comment:
This is the intended behaviour when using single quotes. See the appropriate manual entry (sorry
don't know it by heart).
- Markus
Previous Comments:
------------------------------------------------------------------------
[2001-10-16 19:31:59] beckman@purplecow.com
This has been confirmed in 4.0.6 on the web and as a standalone for both print and printf.
Output from a test:
(root) hot: 1 : /content/adcritic --> php
<?php
printf('<a href="http://">%s</a>\n',"hi");
X-Powered-By: PHP/4.0.6
Content-type: text/html
<a href="http://">hi</a>\n(root) hot: 1 :
/content/adcritic --> php
<?php
printf("<a href='http://'>%s</a>\n","hi");
X-Powered-By: PHP/4.0.6
Content-type: text/html
<a href='http://'>hi</a>
This works:
printf("<a href='http://'>%s</a>\n","hi");
This does NOT work (prints literal "\n"):
printf('<a href="http://">%s</a>\n',"hi");
Same applies to print.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13699&edit=1