| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2006-10-06 11:04 UTC] tony2001@php.net
  [2006-10-06 12:32 UTC] third-chance at gmx dot de
  [2006-10-06 12:44 UTC] tony2001@php.net
  [2006-10-06 14:22 UTC] third-chance at gmx dot de
  [2006-10-06 15:20 UTC] edink@php.net
  [2006-10-06 16:08 UTC] third-chance at gmx dot de
  [2006-10-06 17:26 UTC] third-chance at gmx dot de
  [2006-10-07 09:15 UTC] dirk dot thomas at 4wdmedia dot de
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
Description: ------------ Hello, first: i am using the latest Win32-binary currently available from snaps.php.net (php5.2-win32-200610051830) with an Apache 2.2 (sapi). When calling the function str_replace the fourth parameter - which should be set to the number of replacements - is always set to zero. With Php5.1.1 and an Apache 2.0.55 it works as expected. Best regards, Dirk Reproduce code: --------------- $c = 23; echo str_replace('i', 'o', 'string', $c); echo ' '.$c; Expected result: ---------------- strong 1 Actual result: -------------- strong 0 Even one string replacement took place ('i' => 'o'), the referenced value for counting is set to zero.