PHP code example of zircote / uuid

1. Go to this page and download the library: Download zircote/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/ */

    

zircote / uuid example snippets



var_dump(\Uuid\Uuid::generate());
// string(36) "bb39ae2d-44aa-9e82-9c55-d326c4f12f56"

var_dump(\Uuid\Uuid::generate('7bda4f1062bb11df9e4d5ecec8f8ce7d'));
// string(36) "7bda4f10-62bb-11df-9e4d-5ecec8f8ce7d"

$uuid = new \Uuid\Uuid;

echo $uuid;
// 324e26b2-3378-3c56-6f72-424b3e20b106