PHP code example of nilportugues / uuid

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

    

nilportugues / uuid example snippets



use NilPortugues\Uuid\Uuid;

echo Uuid::create(); // "13dfa123-d7a6-4082-8b3f-513c28f5d691"


use NilPortugues\Uuid\Uuid;

echo Uuid::create(Uuid::NAMESPACE_DNS, 'nilportugues.com');

echo Uuid::create(Uuid::NAMESPACE_URL, 'http://nilportugues.com/robots.txt');

echo Uuid::create(Uuid::NAMESPACE_OID, 'Foo\Bar');

echo Uuid::create(Uuid::NAMESPACE_X500, '/c=us/o=Sun/ou=People/cn=Rosanna Lee');