PHP code example of yftzeng / wow-uuid

1. Go to this page and download the library: Download yftzeng/wow-uuid library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yftzeng / wow-uuid example snippets




use \Wow\Util\Uuid as Uuid;

$uuid1 = Uuid::v1();
$uuid4 = Uuid::v4();
$uuid1_order = Uuid::v1_order(false);
$snowflake = Uuid::snowflake(1, 1);              // (machine_id, datacenter_id)
$snowflake_random = Uuid::snowflake_random();
$snowflake_order = Uuid::snowflake_order(1, 1);  // (machine_id, datacenter_id)

$ php composer.phar update



use \Wow\Util\Uuid as Uuid;

$uuid1 = Uuid::v1();
$uuid4 = Uuid::v4();
$uuid1_order = Uuid::v1_order(false);
$snowflake = Uuid::snowflake(1, 1);              // (machine_id, datacenter_id)
$snowflake_random = Uuid::snowflake_random();
$snowflake_order = Uuid::snowflake_order(1, 1);  // (machine_id, datacenter_id)