jargon

CVSHORT() in PHP

Nov 25th, 2021
653
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function cvshort( $subject = '' )
  4. {
  5.     return ordseries( $subject );
  6. }
  7.  
  8. function ordseries( $subject = '' )
  9. {
  10.     $return = 0;
  11.     for( $o = 0; $o < strlen( $subject ); $o++ )
  12.     {
  13.         $return = ( $return << 8 ) | ord( substr( $subject, $o, 1 ) );
  14.     }
  15.     return $return;
  16. }
  17. ?>
RAW Paste Data