mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
bug #14935: example for addcslashes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67656 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f1c8d8d885
commit
8f53c62aca
1 changed files with 7 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.152 $ -->
|
||||
<!-- $Revision: 1.153 $ -->
|
||||
<reference id="ref.strings">
|
||||
<title>String functions</title>
|
||||
<titleabbrev>Strings</titleabbrev>
|
||||
|
@ -67,9 +67,11 @@ $escaped = addcslashes($not_escaped, "\0..\37!@\177..\377");
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
echo addcslashes('foo[]', 'A..z');
|
||||
// All upper and lower-case letters will be escaped
|
||||
// ... but so will the [\]^_`
|
||||
echo addcslashes('foo[ ]', 'A..z');
|
||||
// output: \f\o\o\[ \]
|
||||
// All upper and lower-case letters will be escaped
|
||||
// ... but so will the [\]^_` and any tabs, line
|
||||
// feeds, carriage returns, etc.
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
@ -82,10 +84,7 @@ echo addcslashes('foo[]', 'A..z');
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
echo addcslashes("zoo['.']", 'z..A');
|
||||
/* output:
|
||||
\zoo['\.']
|
||||
|
||||
*/
|
||||
// output: \zoo['\.']
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
Loading…
Reference in a new issue