php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2532 Iterpretation of \
Submitted: 1999-10-15 08:40 UTC Modified: 1999-10-15 17:33 UTC
From: johnny at crescendo dot ro Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 2 OS: SuSE 6.1
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: johnny at crescendo dot ro
New email:
PHP Version: OS:

 

 [1999-10-15 08:40 UTC] johnny at crescendo dot ro
Maybe I'm too tired at this time, but I think I'm not crazy.

$a="\aa";
$b="\\aa";
if (strcmp($a,$b)==0) echo "Equal";
else echo "Diffrent";

The result is Equal. Maybe is not a bug, may be is the way that PHP see "\" character,
but as I know in C "\a" means "a" and "\\"means"\". 

Is this the way than PHP work or it's a bug?

Sorry for bother you.

Yours,
Bogdan

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-15 17:33 UTC] andrei at cvs dot php dot net
That's the way PHP works. If it sees \ followed by something it
does not recognize, it assumes that it's not an escape sequence.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC