|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78564 Possibly Incorrect Hex Notation
Submitted: 2019-09-18 22:53 UTC Modified: 2019-09-18 23:01 UTC
From: ingmireokc at aol dot com Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: Irrelevant OS: Win 10
Private report: No CVE-ID: None
 [2019-09-18 22:53 UTC] ingmireokc at aol dot com
From manual page:

From the manual: "The precise effect of "\cx" is as follows: if "x" is a lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus "\cz" becomes hex 1A, but "\c{" becomes hex 3B, while "\c;" becomes hex 7B."

Doesn't hex(40) refer to the 7th bit of a binary string? 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-18 23:01 UTC]
-Status: Open +Status: Not a bug
 [2019-09-18 23:01 UTC]
7th bit, yes. It's bit 6 when counting from 0, which is (at least as far as I've seen) how they're normally counted. You know, the same way the 7th element in an array is index 6.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 12:01:32 2024 UTC