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
9--FILE--
10<?php
11/* Prototype  : string crc32(string $str)
12 * Description: Calculate the crc32 polynomial of a string
13 * Source code: ext/standard/crc32.c
14 * Alias to functions: none
15*/
16
17/*
18 * Testing crc32() : basic functionality
19*/
20
21echo "*** Testing crc32() : basic functionality ***\n";
22
23
24// Initialise all required variables
25$str = 'string_val1234';
26
27// Calling crc32() with all possible arguments
28
29// checking for the return type of the function
30var_dump( is_int(crc32($str)) );
31
32// Printing the returned value from the function
33printf("%u\n", crc32($str) );
34
35echo "Done";
36?>
37--EXPECTF--
38*** Testing crc32() : basic functionality ***
39bool(true)
40256895812
41Done
42