Doc #64575 [NEW]: Problem in preg-replace examples (fr translation)

From: Date: Wed, 03 Apr 2013 12:48:21 +0000
Subject: Doc #64575 [NEW]: Problem in preg-replace examples (fr translation)
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9719@lists.php.net to get a copy of this message
From: frankoa at gmail dot com Operating system: PHP version: 5.4.13 Package: Translation problem Bug Type: Documentation Problem Bug description:Problem in preg-replace examples (fr translation) Description: ------------ --- From manual page: http://www.php.net/function.preg-replace#refsect1- function.preg-replace-examples --- In french translation in the documentation, there is mistake. http://php.net/manual/fr/function.preg-replace.php The first test case produce the second test phrase, and vice-versa. <?php $string = 'Le renard marron agile saute par dessus le chien paresseux.'; $patterns = array(); $patterns[0] = '/agile/'; $patterns[1] = '/marron/'; $patterns[2] = '/renard/'; $replacements = array(); $replacements[2] = 'grizzly'; $replacements[1] = 'brun'; $replacements[0] = 'lent'; echo preg_replace($patterns, $replacements, $string); ?> L'exemple ci-dessus va afficher : [Changed] Le lent grizzly brun saute par dessus le chien paresseux. En triant les masques et les remplacements, vous devriez obtenir le résultat escompté. <?php ksort($patterns); ksort($replacements); echo preg_replace($patterns, $replacements, $string); ?> L'exemple ci-dessus va afficher : [Changed] Le grizzly brun lent saute par dessus le chien paresseux. -- Edit bug report at https://bugs.php.net/bug.php?id=64575&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64575&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64575&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64575&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64575&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64575&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64575&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64575&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64575&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64575&r=support Expected behavior: https://bugs.php.net/fix.php?id=64575&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64575&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64575&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64575&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64575&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64575&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64575&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64575&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64575&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64575&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64575&r=mysqlcfg

« previous php.doc.bugs (#9719) next »