|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79552 preg_quote doesnt work on #
Submitted: 2020-05-01 08:59 UTC Modified: 2020-05-01 09:09 UTC
From: devste at devste dot com Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 7.2.30 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: devste at devste dot com
New email:
PHP Version: OS:


 [2020-05-01 08:59 UTC] devste at devste dot com
From manual page:

Test script:
echo preg_quote( 'foo#bar' );

Expected result:

Actual result:

(Note: works correctly in PHP 7.3+)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-01 09:09 UTC]
-Status: Open +Status: Not a bug
 [2020-05-01 09:09 UTC]
Yes, # is escaped since 7.3. See the changelog on the page you linked.
 [2020-05-01 22:27 UTC] a at b dot c dot de
And PHP 7.2 is no longer actively supported (it will receive security fixes only for another six months).
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Sep 24 08:01:25 2023 UTC