1--TEST--
2Test chunk_split() function : usage variations - default 'chunklen' with long string as 'str'argument
3--FILE--
4<?php
5/*
6* passing long string as 'str' and testing default value of chunklen which is 76
7*/
8
9echo "*** Testing chunk_split() : default 'chunklen' with long string 'str' ***\n";
10
11//Initializing variables
12$values = array (
13  "123456789012345678901234567890123456789012345678901234567890123456789012345678901",
14  "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
15);
16
17//loop through each element of values for 'str' and default value of 'chunklen'
18for($count = 0; $count < count($values); $count++) {
19  echo "-- Iteration $count --\n";
20  var_dump( chunk_split($values[$count]) );
21}
22
23echo "Done"
24?>
25--EXPECT--
26*** Testing chunk_split() : default 'chunklen' with long string 'str' ***
27-- Iteration 0 --
28string(85) "1234567890123456789012345678901234567890123456789012345678901234567890123456
2978901
30"
31-- Iteration 1 --
32string(217) "1234567890123456789012345678901234567890123456789012345678901234567890123456
337890123456789012345678901234567890123456789012345678901234567890123456789012
3434567890123456789012345678901234567890123456789012345678901
35"
36Done
37