note 112649 deleted from function.base-convert by googleguy

From: Date: Tue, 09 Jul 2013 11:50:58 +0000
Subject: note 112649 deleted from function.base-convert by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-195542@lists.php.net to get a copy of this message
Note Submitter: cyril dot vazquez at maarch dot org ---- @wyattstorch42 at gmail dot com You can use microtime(true) instead of time() to generate unique ids with base_convert with an improved precision: <?php function generate_id($timestamp = null){ if($timestamp == null) $timestamp = microtime(true); return base_convert($timestamp, 10, 36); } ?>

« previous php.notes (#195542) next »