PHP 4.0 Bug #9325 Updated: wrong parameter count for preg_replace

From: Date: Thu, 22 Feb 2001 15:46:34 +0000
Subject: PHP 4.0 Bug #9325 Updated: wrong parameter count for preg_replace
Groups: php.dev 
Request: Send a blank email to php-dev+get-47253@lists.php.net to get a copy of this message
ID: 9325 Updated by: stas Reported By: tm@salome.datron.cz Old-Status: Open Status: Bogus Bug Type: *Regular Expressions Assigned To: Comments: works for me in latest version. You probably have an old one. BTW, you have bug in your code - preg_replace shoudl take string, not newstring. Previous Comments: --------------------------------------------------------------------------- [2001-02-18 13:14:47] tm@salome.datron.cz i've the following code: <? $string="test test test test" $newstring=preg_replace("/test/","ok",$newstring,1); echo $newstring; ?> from your manual pages to preg_replace function it allow to specify a limit number of matches. But here it reports an error: Wrong parameter count for preg_replace() in test.php on line 3 ;-( --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9325&edit=2

« previous php.dev (#47253) next »