Bug #79552 [Com]: preg_quote doesnt work on #
| From: | a at b dot c dot de | Date: | Fri, 01 May 2020 22:27:29 +0000 |
| Subject: | Bug #79552 [Com]: preg_quote doesnt work on # | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-226875@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79552&edit=1
ID: 79552
Comment by: a at b dot c dot de
Reported by: devste at devste dot com
Summary: preg_quote doesnt work on #
Status: Not a bug
Type: Bug
Package: *Regular Expressions
PHP Version: 7.2.30
Block user comment: N
Private report: N
New Comment:
And PHP 7.2 is no longer actively supported (it will receive security fixes only for another six
months).
Previous Comments:
------------------------------------------------------------------------
[2020-05-01 09:09:46] nikic@php.net
Yes, # is escaped since 7.3. See the changelog on the page you linked.
------------------------------------------------------------------------
[2020-05-01 08:59:49] devste at devste dot com
Description:
------------
---
From manual page: https://php.net/function.preg-quote
---
Test script:
---------------
echo preg_quote( 'foo#bar' );
Expected result:
----------------
foo\#bar
Actual result:
--------------
foo#bar
(Note: works correctly in PHP 7.3+)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79552&edit=1