PHP to Ruby
Convert PHP code into Ruby!
-
crc32
Posted on September 17th, 2009 1 commentThe crc32() function in PHP generates the cyclic redundancy checksum (CRC) polynomial of 32-bit lengths of a string, and returns it as an integer.
PHP
$checksum = crc32('hello world'); echo $checksum; // => 222957957
Ruby
require 'zlib'; puts Zlib.crc32('hello world'); # => 222957957


