Distributed ID generation in PHP for the lazy. Based on the awesome python implementation from SawdustSoftware.
You can read an overview of what this does and why it came into being at the Sawdust Software Blog.
<?php
require "simpleflake.php";
$newId = \simpleflake\generate();
echo "ID: $newId\n";
$parts = \simpleflake\parse($newId);
echo "Timestamp: " . $parts["timestamp"] . "\n";
echo "RandomBits: " . $parts["randomBits"] . "\n";