Use hash() instead of sha256()

sha256() is a function of some extension and not part of the standard
php library. hash('sha256', $text) == sha256($text)