Bug #13699: when using single quotes, print/printf prints literal "\n"

From: Date: Tue, 16 Oct 2001 23:31:59 +0000
Subject: Bug #13699: when using single quotes, print/printf prints literal "\n"
Groups: php.dev 
Request: Send a blank email to php-dev+get-68077@lists.php.net to get a copy of this message
From: beckman@purplecow.com Operating system: FreeBSD 4.1 PHP version: 4.0.6 PHP Bug Type: Output Control Bug description: when using single quotes, print/printf prints literal "\n" 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 bug report at: http://bugs.php.net/?id=13699&edit=1

« previous php.dev (#68077) next »