|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-27 13:58 UTC] scottmac@php.net
[2007-06-27 13:59 UTC] tony2001@php.net
[2007-07-05 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
Description: ------------ This problem showed up after an upgrade to php 5.2.3 that was accompanied by a pcre upgrade to ver 7.0. It works fine on my local system (php 5.2.3, pcre 6.7) The browser returns a download dialog rather than an error. If I remove the "=" from the pattern, it works, but doesn't find anything. Reproduce code: --------------- <?php $s = "((?is-U)<input(?:(?:\s*\w*\s*(?:=(?:(?:'.*?')|(?:\".*?\")|(?:\w*)))?)*)(?:>|(?:\/>)))"; $formHTML = "Nothing to see here:<input name='blah' value=''></input>"; echo preg_replace("/" . $s . "/is", "muffin", $formHTML); ?> Expected result: ---------------- I would expect this code to replace the input tag string with "muffin". I would also expect it not to crash. Actual result: -------------- Download dialog box.