#49487 [NEW]: addslashes â Quote string with slashes
From: shefik at allknightaccess dot com
Operating system: Mac 10.5.8
PHP version: 5.3.0
PHP Bug Type: Feature/Change Request
Bug description: addslashes â Quote string with slashes
Description:
------------
Please add a new parameter for the function addslashes, where it flags
what type of character to quote string with slashes.
Such as:
SINGLE
DOUBLE
BACKSLASH
NULL
ALL
All would remain the default, as it is right now. Example use with the
new parameter:
<?php
$str = "He asked, \"Is your name O'reilly?\"";
// Outputs: He asked, "Is your name O\'reilly?"
echo addslashes($str, SINGLE);
?>
<?php
$str = "He asked, \"Is your name O'reilly?\"";
// Outputs: He asked, \"Is your name O'reilly?\"
echo addslashes($str, DOUBLE);
?>
<?php
$str = "He asked, \"Is your name O'reilly?\"";
// Outputs: He asked, \"Is your name O\'reilly?\"
echo addslashes($str, ALL);
?>
--
Edit bug report at http://bugs.php.net/?id=49487&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49487&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49487&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49487&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49487&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49487&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49487&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49487&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49487&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49487&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49487&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49487&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49487&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49487&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49487&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49487&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49487&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49487&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49487&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49487&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49487&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49487&r=mysqlcfg
Thread (2 messages)
- shefik at allknightaccess dot com