PHP マニュアル > 関数リファレンス > 暗号 > Hash > Hash 関数 ▼ 以下は、アルゴリズムに sha256 を使用しています
php -r "print hash('sha256','適当な文字列');"