#34908 [NEW]: uniqeid produces too long strings on cygwin
From: nohn@php.net
Operating system: Cygwin
PHP version: 5.1.0RC3
PHP Bug Type: Strings related
Bug description: uniqeid produces too long strings on cygwin
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 bug report at http://bugs.php.net/?id=34908&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34908&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34908&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34908&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34908&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34908&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34908&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34908&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34908&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34908&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34908&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34908&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34908&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34908&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34908&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34908&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34908&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34908&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34908&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34908&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34908&r=mysqlcfg
Thread (8 messages)
- nohn@php.net