Doc #76984 [NEW]: class name with unicode characters are accepted

From: Date: Tue, 09 Oct 2018 13:01:41 +0000
Subject: Doc #76984 [NEW]: class name with unicode characters are accepted
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16062@lists.php.net to get a copy of this message
From: info at developiu dot it Operating system: linux (centos 7) PHP version: 7.1.22 Package: Documentation problem Bug Type: Documentation Problem Bug description:class name with unicode characters are accepted Description: ------------ --- From manual page: http://www.php.net/language.oop5.basic --- in this page it is said "The class name can be any valid label, provided it is not a PHP reserved word. A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$." from the regular expression class names with unicode charaters shbould not be accepted, but this is not true. Test script: --------------- <?php class Հ {} var_dump(new Հ); Expected result: ---------------- a parse error Actual result: -------------- class Հ#1 (0) { } -- Edit bug report at https://bugs.php.net/bug.php?id=76984&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76984&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76984&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76984&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76984&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76984&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76984&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76984&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76984&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76984&r=support Expected behavior: https://bugs.php.net/fix.php?id=76984&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76984&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76984&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76984&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76984&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76984&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76984&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76984&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76984&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76984&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76984&r=mysqlcfg

« previous php.doc.bugs (#16062) next »