Skip to content

Instantly share code, notes, and snippets.

View peterchaula's full-sized avatar

Peter Chaula peterchaula

  • Johannesburg, South Africa
View GitHub Profile
@peterchaula
peterchaula / benchmark.php
Last active December 30, 2016 08:45 — forked from BlakeGardner/benchmark.php
Benchmark of all the hashing algorithms provided by PHP
<?php
foreach (hash_algos() as $algo) {
$start_time = microtime(TRUE);
for ($index = 0; $index <= 500000; $index++) {
$hash = hash($algo, $index);
}