#46054 [NEW]: comment of addcslashes 'A..z' is wrong

From: Date: Thu, 11 Sep 2008 15:38:01 +0000
Subject: #46054 [NEW]: comment of addcslashes 'A..z' is wrong
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1147@lists.php.net to get a copy of this message
From: miau dot jp at gmail dot com Operating system: Windows PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: comment of addcslashes 'A..z' is wrong Description: ------------ http://php.net/manual/en/function.addcslashes.php says 'A..z' escapes any tabs, line feeds, carriage retuns. But 'A..z' escapes just upper and lower-case letters and the [\]^_`. Reproduce code: --------------- <?php for ($n = 0x00; $n < 0x80; $n++) { $c = chr($n); $escaped = addcslashes($c, 'A..z'); if (strlen($escaped) == 2) { print ($n < 0x20 ? $escaped : $c); } } ?> Expected result: ---------------- \t\n\v\f\rABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz Actual result: -------------- ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz -- Edit bug report at http://bugs.php.net/?id=46054&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46054&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46054&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46054&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46054&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46054&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46054&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46054&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46054&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46054&r=support Expected behavior: http://bugs.php.net/fix.php?id=46054&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46054&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46054&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46054&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46054&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46054&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46054&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46054&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46054&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46054&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46054&r=mysqlcfg

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