php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73502 [FR] bug in documentation
Submitted: 2016-11-11 23:09 UTC Modified: 2016-11-24 20:50 UTC
From: thib3113 at gmail dot com Assigned:
Status: Not a bug Package: Translation problem
PHP Version: 7.1.0RC6 OS:
Private report: No CVE-ID: None
 [2016-11-11 23:09 UTC] thib3113 at gmail dot com
Description:
------------
---
From manual page: http://php.net/manual/fr/function.preg-replace.php
---

the exemple #2 return : "Le grizzly brun lent saute par dessus le chien paresseux."

and not "Le lent grizzly brun saute par dessus le chien paresseux."


Test script:
---------------
$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);

echo "\n";


ksort($patterns);
ksort($replacements);
echo preg_replace($patterns, $replacements, $string);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-11 23:19 UTC] cmb@php.net
-Summary: bug in documentation +Summary: [FR] bug in documentation -Package: *General Issues +Package: Translation problem
 [2016-11-24 20:50 UTC] pierrick@php.net
-Status: Open +Status: Not a bug
 [2016-11-24 20:50 UTC] pierrick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The real return is really "Le lent brun grizzly saute par dessus le chien paresseux.". You can try the code.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 00:01:30 2024 UTC