1. Go to this page and download the library: Download regexp1987/blake3 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/ */
bash
cd path/to/blake3
# Generate build system
phpize
# Configure
./configure
# Build (use all CPU cores)
make -j$(nproc)
# Run test suite
make test
# Install to PHP extension directory
sudo make install
# Enable the extension
echo "extension=blake3.so" | sudo tee /etc/php/8.4/mods-available/blake3.ini
sudo phpenmod blake3
# Verify
php -r "echo blake3('hello') . PHP_EOL;"
# Output: ea8f163db38682925e4491c5e58d4bb3506ef8c14eb78a86e908c5624a67200f
bat
cd path\to\blake3
phpize
configure --enable-blake3
nmake
php -r "echo blake3('hello');"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.