|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-01-27 09:58 UTC] andrei at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 18:00:01 2025 UTC |
Here is the PHP script that caused the problem: <? $regexes = array("/(bold)/i", "/(something)/"); $text = "This is really something to see! A bold new achievement in the world of bugs. Not to mention something that I pr\ obably misspeled there. Woo hoo!"; $new = preg_replace($regexes, "<B>\\1</B>", $text); print $new; ?> That's the entire php file, btw. Under PHP3, this would bold all occurances of the words "bold" and "something". Under PHP4b3 (downloaded about 3 hours before submitting this), it does NOT replace correctly past the first occurance, and it mangles the string in the process. Here is the output: --- This is really <B>something</B> to see! A <B>bold</B> new achievement in the world of bugs. Not to mention <B>y misspel</B> that I probably misspeled there. Woo hoo! --- Ok, this is running PHP4b3 on Solaris 7 5/99, using gcc 2.8.1 downloaded from www.sunfreeware.com. It's running on a really old SparcStation 10, so it's only 32 bit solaris... The configuration command for php4 was: configure --with-xml --enable-trans-sid --with-pgsql --with-apache=../apache_1.3.9 And the only configure options to Apache were first the --prefix=/usr/local/apache, and then after installing php4 into it, --prefix=/usr/local/apache and --activate-module=src/modules/php4/libphp4.a Thanks! -- Dave