1--TEST--
2Test crc32() function : basic functionality
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 4)
6  die("skip this test is for 32bit platform only");
7?>
8--FILE--
9<?php
10/* Prototype  : string crc32(string $str)
11 * Description: Calculate the crc32 polynomial of a string
12 * Source code: ext/standard/crc32.c
13 * Alias to functions: none
14*/
15
16/*
17 * Testing crc32() : basic functionality
18*/
19
20echo "*** Testing crc32() : basic functionality ***\n";
21
22
23// Initialise all required variables
24$str = 'string_val1234';
25
26// Calling crc32() with all possible arguments
27
28// checking for the return type of the function
29var_dump( is_int(crc32($str)) );
30
31// Printing the returned value from the function
32printf("%u\n", crc32($str) );
33
34echo "Done";
35?>
36--EXPECTF--
37*** Testing crc32() : basic functionality ***
38bool(true)
39256895812
40Done
41