PHP code example of martiis / uuid-console

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

    

martiis / uuid-console example snippets


php ./bin/uuid generate
18c68556-4d4f-11ed-b7cd-0242ac120002

php ./bin/uuid decode 3b8f1012-4d4f-11ed-90e0-0242ac120002
 -------------- --------------------------------------
  str            3b8f1012-4d4f-11ed-90e0-0242ac120002
  str-hex        3b8f10124d4f11ed90e00242ac120002
  version        1
  ord-time       0x11ed4d4f3b8f101290e00242ac120002
  encoded time   2022-10-16T12:37:01+00:00
 -------------- --------------------------------------

php ./bin/uuid decode 0x11ed4d4f3b8f101290e00242ac120002
 -------------- --------------------------------------
  str            3b8f1012-4d4f-11ed-90e0-0242ac120002
  str-hex        3b8f10124d4f11ed90e00242ac120002
  version        1
  ord-time       0x11ed4d4f3b8f101290e00242ac120002
  encoded time   2022-10-16T12:37:01+00:00
 -------------- --------------------------------------