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:
irc-html 2002-01-12 23:32:00 +00:00
parent f1c8d8d885
commit 8f53c62aca

View file

@ -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>