php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65789 addcslashes "predefined escape sequences"
Submitted: 2013-09-30 11:54 UTC Modified: 2013-10-01 17:22 UTC
From: jakub dot lopuszanski at nasza-klasa dot pl Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-09-30 11:54 UTC] jakub dot lopuszanski at nasza-klasa dot pl
Description:
------------
The english doc http://php.net/manual/en/function.addcslashes.php contains a 
cryptic sentence:
"In PHP \0 (NULL), \r (carriage return), \n (newline), \f (form feed), \v 
(vertical tab) and \t (tab) are predefined escape sequences, while in C all of 
these are predefined escape sequences."

I am not native speaker, but I double checked and the substring "are predefined 
escape sequences" occurs twice in this sentence, making it hard to spot the 
difference between PHP and C (if any?)

---
From manual page: http://www.php.net/function.addcslashes
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-01 03:35 UTC] gabri dot ns at gmail dot com
"these" refers to sequence from current and previous sentences.
but indeed it is really confusing. my proposal is to change it to:

---------
Be careful if you choose to escape characters 0, a, b, f, n, r,
t and v. They will be converted to \0 (NULL), \a (bell), \b
(backspace), \f (form feed), \n (newline), \r (carriage return),
\t (tab) and \v (vertical tab). In PHP, *only* \0, \r, \n, \f, \v
and \t are predefined escape sequences, while in C all of these
are predefined escape sequences.
---------

i think this paragrahp is mean to compare addslashes and add'c'slashes.
 [2013-10-01 17:22 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=331629
Log: Clarify the charlist warning on the addcslashes() page.

Fixes doc bug #65789 (addcslashes "predefined escape sequences").
 [2013-10-01 17:22 UTC] aharvey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
 [2013-10-01 17:22 UTC] aharvey@php.net
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.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 21:00:02 2026 UTC