#46054 [Opn->Csd]: comment of addcslashes 'A..z' is wrong

From: Date: Sun, 02 Nov 2008 17:14:22 +0000
Subject: #46054 [Opn->Csd]: comment of addcslashes 'A..z' is wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1292@lists.php.net to get a copy of this message
ID: 46054 Updated by: danbrown@php.net Reported By: miau dot jp at gmail dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows PHP Version: Irrelevant New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2008-09-11 15:38:01] miau dot jp at gmail dot com 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 this bug report at http://bugs.php.net/?id=46054&edit=1

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