From:             [EMAIL PROTECTED]
Operating system: Windows2000 / IIS5
PHP version:      4.1.2
PHP Bug Type:     Regexps related
Bug description:  preg_replace /e causes access violation

this code causes an access violation on IIS5/Windows2000/PHP4.1.2

Reports are that it works fine with apache4.0.6 (OS unknown):

<?php

$str = "here's some code:\n [code]//yep;\n \$a = 0; if (\$a < 1) { echo
'moo &amp;'; }\n[/code]";
$str = preg_replace('/(\[code\])([^\[]*)(\[\/code\])/ie',
"'<br><br>code:<hr size=\"1\"><pre>' . htmlspecialchars('\\2') . '<hr
size=\"1\"></pre>'", $str);

echo $str;

?>

S
-- 
Edit bug report at http://bugs.php.net/?id=16976&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16976&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16976&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16976&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16976&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16976&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16976&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16976&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16976&r=submittedtwice

Reply via email to