Re: Bug #1210: str_replace does not work when needle at end of haystack
| From: | Egon Schmid | Date: | Sun, 07 Mar 1999 20:28:51 +0000 |
| Subject: | Re: Bug #1210: str_replace does not work when needle at end of haystack | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-4515@lists.php.net to get a copy of this message | ||
It is correct. What does say -Stig? I got "12a34".
-Egon
On 7 Mar 1999 venaas@itea.ntnu.no wrote:
> From: venaas@itea.ntnu.no
> Operating system: linux and solaris
> PHP version: 3.0.7
> PHP Bug Type: Misbehaving function
> Bug description: str_replace does not work when needle at end of haystack
>
> The following script outputs 12a12 as expected with 3.0.6 on Linux
> using the regexp library bundled with PHP. Using the exact same
> configuration with 3.0.7 produces 12a34. Here is the script:
>
> <?php
> echo str_replace("34", "12", "34a");
> echo str_replace("34", "12", "34");
> ?>
>
> It also fails with 3.0.7 on Solaris with a very different configuration.
>
> Stig
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net