Bug #71897 [NEW]: ASCII 0x7F Delete/Backspace control character permitted in identifiers

From: Date: Fri, 25 Mar 2016 10:47:56 +0000
Subject: Bug #71897 [NEW]: ASCII 0x7F Delete/Backspace control character permitted in identifiers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200087@lists.php.net to get a copy of this message
From:             ajf
Operating system: *
PHP version:      Irrelevant
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:ASCII 0x7F Delete/Backspace control character permitted in identifiers

Description:
------------
Identifiers in PHP source code conform to the regex
/[_a-zA-Z\x7F-\xFF][_0-9a-zA-Z\x7F-\xFF]*/. Most of this regex is pretty
standard: it allows alphanumeric ASCII characters and underscores, plus
any character with the 8th bit set (presumably to allow any extension of
ASCII, such as Latin-1 or UTF-8, to be used).

But there's one part of this I find rather curious: why is \x7F
included? It's not a high-byte/8-bit character, it's a 7-bit ASCII
character, and a control character at that. Unless there's some ASCII
extension which reuses that value as a printing character, I assume it
must be a mistake to include this character. As a control character, it
is invisible and difficult to type. Worse, if you were to include it
within an identifier, it would hide the preceding printing character
(because \x7F moves the cursor back one column in terminal emulators).


-- 
Edit bug report at https://bugs.php.net/bug.php?id=71897&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71897&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71897&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71897&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71897&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71897&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71897&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71897&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71897&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71897&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71897&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71897&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71897&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71897&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71897&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71897&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71897&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71897&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71897&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71897&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71897&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#200087) next »