jurruh / blockchain
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
pkg:composer/jurruh/blockchain
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is not auto-updated.
Last update: 2025-12-21 09:19:10 UTC
README
This repository contains a basic PHP blockchain implementation.
Example usage:
//Create the chain $chain = new \Blockchain\Chain(); //Add some blocks to te chain $firstBlock = new \Blockchain\Block(0, null, time(), 'Example data 1'); $chain->addBlock($firstBlock); $secondBlock = new \Blockchain\Block(1, $firstBlock->getHash(), time(), 'Example data 2'); $chain->addBlock($secondBlock); //Check if valid if($chain->isValid()){ //The chain is valid }