Perpetual hash implementation for PHP