http://nl.php.net/manual/en/function.uniqid.php

Excerpt, added arrows:
----------------------
string uniqid ( [string prefix [, bool more_entropy]])

uniqid() returns a prefixed unique identifier based on the current time in microseconds. prefix is --> optional <-- but can be useful, for instance, if you generate identifiers simultaneously on several hosts that might happen to generate the identifier at the same microsecond. Up until PHP 4.3.1, prefix could only be a maximum of 114 characters long.

If the --> optional <-- more_entropy parameter is TRUE....
----------------------

So both parameters should be optional, but I do get a warning:

Warning: uniqid() expects at least 1 parameter, 0 given in /Library/WebServer/Documents/foo.php on line 7

with the following code:

<?php

ini_set('display_errors', '1'); // display errors in the HTML
ini_set('track_errors', '1'); // display errors in the HTML
error_reporting(E_ALL); // *all* of them. Default is: error_reporting(E_ALL ^ E_NOTICE);


echo uniqid();
?>

Regards,

Martin

Reply via email to