ext/filter, preg_* compatibility

From: Date: Sun, 09 Apr 2006 16:33:01 +0000
Subject: ext/filter, preg_* compatibility
Groups: php.internals 
Request: Send a blank email to internals+get-22690@lists.php.net to get a copy of this message
Hello, While testing pecl/filter, I noticed that many tests fail. Many of the errors are related to the FILTER_VALIDATE_REGEXP mode. This mode uses pcre natively to compile and execute the give regex. It is not compatible with the php pcre extension, which makes its usage a bit tricky, to port existing applications is even more annoying. Here is a first patch: http://pear.php.net/~pierre/filter_pcre.txt It uses pcre_get_compiled_regex from ext/pcre to compile the regex and fixes a little bug (matches can zero, see the comment). The benefits are: - compatible with ext/pcre - use of the compiled expressions cache It would also be nice if every additions to ext/filter will use the ext/pcre API. --Pierre

« previous php.internals (#22690) next »