2 /* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
3 * Description: Returns split line
4 * Source code: ext/standard/string.c
5 * Alias to functions: none
9 * passsing different integer values for 'chunklen' argument to chunk_split()
10 * 'ending' is set to '||'
13 echo "*** Testing chunk_split() : different integer values for 'chunklen' ***\n";
15 //Initializing variables
17 $str = "This contains\tand special char & numbers 123.\nIt also checks for \0 char";
19 // different values for chunklen
23 -123, //negative integer
25 0x1A, //hexadecimal number
26 PHP_INT_MAX
, //max positive integer number
27 PHP_INT_MAX
* 3, //integer overflow
28 -PHP_INT_MAX
- 1, //min negative integer
32 for($count = 0; $count < count($values); $count++
) {
33 echo "-- Iteration $count --\n";
34 var_dump( chunk_split($str, $values[$count], $ending) );