3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HashCracker { private $range = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; private $length = 32; private $cycles = 1000; public function runBenchmark($prefix = '') { foreach ($this->range as $key) { $times[$key] = microtime(true); for ($i = 0; $i < $this->cycles; $i += 1) { } $times[$key] = microtime(true) - $times[$key]; } asort($times); var_dump($times, reset($times)); } } $password = 'hello'; $hashed = md5($password); var_dump('Hash to match: ' . $hashed); (new HashCracker())->runBenchmark();

preferences:
39.89 ms | 402 KiB | 5 Q