- mb_convert_encoding: documentation ( source)
- sha1: documentation ( source)
- strtoupper: documentation ( source)
<?php
// The normal way
echo sha1('1981');
echo PHP_EOL;
// Your way
$str = mb_convert_encoding('1981', 'UTF-16LE');
echo $result = strtoupper(sha1($str));