Get result of crc32() with and without the "%u" formatter in PHP

Description

The following code shows how to get result of crc32() with and without the "%u" formatter.

Example


/*  w ww  .ja  va 2s. c o m*/

<?php
    $str = crc32("Hello world!");
    echo 'Without %u: '.$str."<br>";
    echo 'With %u: ';
    printf("%u",$str);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions