wooserv / php-objectid
Fast, lightweight MongoDB-style ObjectId generator for PHP.
Installs: 75
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/wooserv/php-objectid
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10
README
Fast, lightweight MongoDB-style ObjectId generator for PHP.
Installation
composer require wooserv/php-objectid
Usage
use WooServ\ObjectId\ObjectId; $id = ObjectId::generate(); if (ObjectId::isValid($id)) { echo "Timestamp: " . date('Y-m-d H:i:s', ObjectId::getTimestamp($id)); }
Tests
composer test
License
MIT © WooServ