|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-13 13:06 UTC] daniel at lorch dot cc
The PCRE has problems with strings containing 0x00. It stops reading as if the strings were \0 terminated. This affects all preg_* functions.
Examples:
preg_match("/\x00/", "foo");
preg_match("/" . chr(0) . "/", "foo");
Raises the error "Warning: No ending delimiter '/' found"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 07:00:01 2025 UTC |
pcre is binary safe with regards to the string being matched against, but not the pattern. this is a limitation of the pcre library itself, not just the php interface. you can specify the nul character using: preg_match("/\\x00/", "foo\0bar") reclassified as documentation problem.