php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ingmireokc at aol dot com
New email:
PHP Version: OS:

 

 [2019-09-18 22:53 UTC] ingmireokc at aol dot com
Description:
------------
---
From manual page: https://php.net/regexp.reference.escape
---

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? 



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-18 23:01 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2019-09-18 23:01 UTC] requinix@php.net
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-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 20:03:33 2021 UTC