php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52264 [DE] Important change of behavior of mt_srand is documented ambiguous.
Submitted: 2010-07-06 15:54 UTC Modified: 2010-08-23 17:29 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sumeruter at googlemail dot com Assigned: raphaelm (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2010-07-06 15:54 UTC] sumeruter at googlemail dot com
Description:
------------
I think the documentation of the change of the behavior of mt_srand/mt_rand is ambiguous and hence wrong translated.

In mt_srand -> Changelog -> Since 5.2.1 it is said:
"Identical seeds no longer produce the same sequence of values they did in previous versions." (English documentation)
"Identische Seeds erzeugen nicht länger die selbe Sequenz von Werten wie in früheren Versionen." (German documentation)
"Des initialisations identiques ne produisent plus la même séquence de valeurs, comme cela pouvait être le cas dans les versions antérieures." (French documentation)

As I am not a native English speaker I am not sure if I understand the meaning of the English sentence correctly:
Identical seeds still produce the same sequence of values, but not the same as in previous versions.
(The other interpretation would be: "Identical seeds no longer produce the same sequence of values, but they did in previous versions.")

The German translation is likewise ambiguous. The sentence can be interpreted as "Identische Seeds erzeugen nicht länger >_die selbe Sequenz von Werten wie in früheren Versionen_<." (like first English interpretation) or ">_Identische Seeds erzeugen nicht länger die selbe Sequenz von Werten_<, wie [es] in früheren Versionen [war]." (second English interpretation)

The French translation is less ambiguous, but wrong as I belive:
(translated back in English) Identical seeds no longer produce the same sequence of values (as might have been the case in earlier versions).

(Sorry for my broken English, my mother tongue is German.)

Test script:
---------------
<?php
mt_srand($afixvalue);
echo mt_rand().",".mt_rand().",".mt_rand().",".mt_rand();

echo " - ";

mt_srand($afixvalue);
echo mt_rand().",".mt_rand().",".mt_rand().",".mt_rand();
?>

Expected result:
----------------
Output PHP version < 5.2.1 (p.e.):
3,42,11,23 - 3,42,11,23

Output PHP version >= 5.2.1 (my interpretation, p.e.):
2,7,12,8 - 2,7,12,8

Output PHP version >= 5.2.1 (second interpretation, p.e.):
16,1,47,89 - 5,19,22,13




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-18 05:56 UTC] yannick@php.net
-Summary: Important change of behavior of mt_srand is documented ambiguous. +Summary: [DE] Important change of behavior of mt_srand is documented ambiguous.
 [2010-08-23 17:28 UTC] raphaelm@php.net
Automatic comment from SVN on behalf of raphaelm
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302713
Log: Doc Bug #52264: [DE] Important change of behavior of mt_srand is documented ambiguous
fixed
 [2010-08-23 17:29 UTC] raphaelm@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: raphaelm
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 01:03:40 2021 UTC