PHP code example of gaotiefeng / tool

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

    

gaotiefeng / tool example snippets


$snowflake = new Snowflake();
$snowflake = new Snowflake(12345,67891);//工作机器id
$snowflake->setStartTimeStamp(strtotime('2020-09-09')*1000);
$id = $snowflake->id();