php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #2389 addslashes make a mistake when there are digits after \
Submitted: 1999-09-27 09:07 UTC Modified: 1999-09-27 13:22 UTC
From: alevine at db-soft dot it Assigned: jah (profile)
Status: Closed Package: Documentation problem
PHP Version: 3.0.9 OS: Linux Slackware 3.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alevine at db-soft dot it
New email:
PHP Version: OS:

 

 [1999-09-27 09:07 UTC] alevine at db-soft dot it
$Path=addslashes("\123moon\year\one");

The result will be:
Smoon\\year\\one

Compiled with mysql


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-27 12:41 UTC] jah at cvs dot php dot net
Within double quotes, strings matching regexp \[0-7]{1,3} are considered to be
octal numbers, likewise strings matching regexp \x[0-9A-Fa-f]{1,2} are
considered to be hexadecimal numbers. Use single quotes.

Bug reclassified as documentation problem (until fixed).
 [1999-09-27 13:22 UTC] jah at cvs dot php dot net
Fixed in the docs.
 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of jah
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=de48047a5d812ac729341279c0d329ae0b66ec7a
Log: Fix #2389.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 09:00:01 2026 UTC