ID:               34908
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: Cygwin
 PHP Version:      5.1.0RC3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

On Cygwin systems to ensure a trully unique id the more_entropy is
enabled by default, which causes another 9 characters to appear at the
end. This is a not a bug.


Previous Comments:
------------------------------------------------------------------------

[2005-10-18 15:29:37] [EMAIL PROTECTED]

Description:
------------
Taking the regression test tests/strings/001.phpt, uniqid behaves
different on Cygwin than specified in the manual.

This may be related to #2201, but the very same test acts on Linux as
expected.

Reproduce code:
---------------
<?php
echo "Testing uniqid: ";
$str = "prefix";
$ui1 = uniqid($str);
$ui2 = uniqid($str);
if (strlen($ui1) == strlen($ui2) && strlen($ui1) == 19 && $ui1 != $ui2)
{
        echo("passed\n");
} else {
        echo("failed!\n");
}

var_dump(strlen($ui1));
var_dump(strlen($ui2));
var_dump($ui1);
var_dump($ui2);
?>


Expected result:
----------------
$ php  ~/test.php 
Testing uniqid: failed!
int(29)
int(29)
string(29) "prefix4354f7719641d8"
string(29) "prefix4354f7719641d3"

Actual result:
--------------
$ php  ~/test.php 
Testing uniqid: failed!
int(29)
int(29)
string(29) "prefix4354f7719641d8.40924743"
string(29) "prefix4354f7719641d3.17144927"



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34908&edit=1

Reply via email to