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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 00:03:40 2023 UTC