Bug in str_replace(), PHP 4.0.6

        $text = "hello   world";
        $out = str_replace("  "," ",$text);
        echo $out;

Expected output:
        "hello world"   

Actual output:
        "hello  world"

Of course, this is what happens if str_replace() does replacements on input,
but not on the soon-to-be output it is working on. Is this to be expected,
or would it be ok to modify the functionality of str_replace()?

/Martin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to