Doc #69234 [Opn->Csd]: Escaped single quotes within double quotes not recognized

From: Date: Thu, 23 Jun 2016 23:58:33 +0000
Subject: Doc #69234 [Opn->Csd]: Escaped single quotes within double quotes not recognized
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13597@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69234&edit=1 ID: 69234 Updated by: cmb@php.net Reported by: chrisdmiddleton at gmail dot com Summary: Escaped single quotes within double quotes not recognized -Status: Open +Status: Closed Type: Documentation Problem Package: Scripting Engine problem PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-06-23 23:57:57] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=339469 Log: Fix #69234: Escaped single quotes within double quotes not recognized ------------------------------------------------------------------------ [2015-11-22 08:20:30] info at stenschke dot com this is the expected behavior, not a bug. see php documentation. ------------------------------------------------------------------------ [2015-03-13 04:35:54] chrisdmiddleton at gmail dot com > Do you feel like the documentation should explicitly point out that "escaping" the > opposite quote character will keep the backslash? Given that this is not the case in most other languages, I think it could be worth pointing out. I understand the reasoning now though. ------------------------------------------------------------------------ [2015-03-13 02:16:06] requinix@php.net \' and \" are about inserting the string delimiter character. The consistency is that '\"' and "\'" both retain their backslashes. And as you quoted, >As in single quoted strings, escaping any other character [not included in the >above table] will result in the backslash being printed too. Do you feel like the documentation should explicitly point out that "escaping" the opposite quote character will keep the backslash? ------------------------------------------------------------------------ [2015-03-12 22:36:19] chrisdmiddleton at gmail dot com I see now that the behavior is somewhat consistent, in the sense that the characters which are escapable are the *minimum* set of characters. (Since you don't need the backslash for single quotes in double quotes, why provide it...) But the behavior is somewhat counterintuitive and the documentation should at least be made clear about this particular case. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=69234 -- Edit this bug report at https://bugs.php.net/bug.php?id=69234&edit=1

« previous php.doc.bugs (#13597) next »