Advertisement
Guest User

Untitled

a guest
Jun 24th, 2012
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function get_arbitrary_symbol($data, $symbols = array('∞')) {
  2.     $hash = sha1($data);
  3.     $substring = substr($hash, 0, 6);
  4.     $integer = hexdec($substring);
  5.     $length = count($symbols);
  6.    
  7.     return $symbols[ $integer % $length ];    
  8. }
Advertisement
RAW Paste Data Copied
Advertisement