Bug #76975 [NEW]: preg_match difference between 7.3 and < 7.3 - II
From: mlocati at gmail dot com
Operating system: Any
PHP version: 7.3.0RC2
Package: PCRE related
Bug Type: Bug
Bug description:preg_match difference between 7.3 and < 7.3 - II
Description:
------------
It seems that '/^[\\w-:]+$/' is no more a valid regular expression with
PHP 7.3: we now have this error
Compilation failed: invalid range in character class at offset 4
I understand that this regex is malformed (I think that the original
author of the affected regex may have meant '/^[\\w\\-:]+$/'), but it's
a breaking change:
that regular expression worked for all the previous PHP versions (see
https://3v4l.org/vD5O2 )
Test script:
---------------
<?php
$tag = 'p';
var_dump(preg_match('/^[\\w-:]+$/', $tag));
--
Edit bug report at https://bugs.php.net/bug.php?id=76975&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76975&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76975&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76975&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76975&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76975&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76975&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76975&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76975&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76975&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76975&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76975&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76975&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76975&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76975&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76975&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76975&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76975&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76975&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76975&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76975&r=mysqlcfg
Thread (2 messages)
- mlocati at gmail dot com