https://github.com/wooserv/php-objectid
Fast, lightweight MongoDB-style ObjectId generator for PHP.
https://github.com/wooserv/php-objectid
objectid php
Last synced: 5 months ago
JSON representation
Fast, lightweight MongoDB-style ObjectId generator for PHP.
- Host: GitHub
- URL: https://github.com/wooserv/php-objectid
- Owner: wooserv
- License: mit
- Created: 2025-11-09T02:21:53.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-09T07:39:36.000Z (7 months ago)
- Last Synced: 2026-01-14T14:53:58.594Z (5 months ago)
- Topics: objectid, php
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 13
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP ObjectId
**Fast, lightweight MongoDB-style ObjectId generator for PHP.**
[](https://github.com/wooserv/php-objectid/actions/workflows/tests.yml)
[](LICENSE)
---
## Installation
```bash
composer require wooserv/php-objectid
```
## Usage
```bash
use WooServ\ObjectId\ObjectId;
$id = ObjectId::generate();
if (ObjectId::isValid($id)) {
echo "Timestamp: " . date('Y-m-d H:i:s', ObjectId::getTimestamp($id));
}
```
## Tests
```bash
composer test
```
---
## License
MIT © [WooServ](https://www.wooserv.com/)