#!/usr/bin/php \n"; exit(2); } # TODO: crc32file (inkl wildcard) $str = trim($argv[1]); $crc = crc32($str); echo "crc32('$str') = $crc (0x".zerofill(dechex($crc), 4*2).")\n"; exit(0); # --- function zerofill($mStretch, $iLength = 2) { # http://php.net/manual/en/function.str-pad.php#74259 $sPrintfString = '%0' . (int)$iLength . 's'; return sprintf($sPrintfString, $mStretch); }