Doc #62756 [NEW]: preg documentation should mention '=' should not be first in character class

From: Date: Mon, 06 Aug 2012 11:32:58 +0000
Subject: Doc #62756 [NEW]: preg documentation should mention '=' should not be first in character class
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8700@lists.php.net to get a copy of this message
From: marco at greenlightsolutions dot nl Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:preg documentation should mention '=' should not be first in character class Description: ------------ --- From manual page: http://www.php.net/regexp.reference.character-classes --- Briefly: The documentation for character classes should state that '=' after '[' is a reserved construct and should be avoided. In detail: If you put a '=' first in a character class in a perl regular expression, such as '[=~]', in certain versions of PHP (including PHP 5.3.8) this will fail to compile, with a warning "Compilation failed: POSIX collating elements are not supported". Rewriting it as '[~=]' prevents the error message. This is because the combination "[=" is seen as indicative of a "POSIX collating element", a reserved, not-yet-implemented syntactical construct. A full description of the cause was written up by Tom Christiansen at http://stackoverflow.com/questions/7173787/compilation-failed-posix-collating-elements-are-not-supported#7175589. The 'preg character classes' documentation page should include the information that '=' in the beginning of a character class is treated special, but it doesn't mention the '=' sign at all. -- Edit bug report at https://bugs.php.net/bug.php?id=62756&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62756&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62756&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62756&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62756&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62756&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62756&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62756&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62756&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62756&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62756&r=support Expected behavior: https://bugs.php.net/fix.php?id=62756&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62756&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62756&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62756&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62756&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62756&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62756&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62756&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62756&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62756&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62756&r=mysqlcfg

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