Advertisement
jargon

CVSHORT() in PHP

Nov 25th, 2021
1,320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement