PHP code example of odan / tsid

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

    

odan / tsid example snippets


use Odan\Tsid\TsidFactory;

$tsidFactory = new TsidFactory();

$tsid = $tsidFactory->generate();

// 388400145978465528
echo $tsid->toInt();

// 0ARYZVZXW377R
echo $tsid->toString();