1--TEST-- 2Test chunk_split() function : basic functionality 3--FILE-- 4<?php 5/* 6* Testing chunk_split() for basic functionality by passing all possible 7* arguments as well as with default arguments chunklen and ending 8*/ 9 10echo "*** Testing chunk_split() : basic functionality ***\n"; 11 12 13// Initialise all required variables 14$str = 'Testing'; 15$chunklen = 2; 16$ending = '##'; 17 18// Calling chunk_split() with all possible arguments 19echo "-- Testing chunk_split() with all possible arguments --\n"; 20var_dump( chunk_split($str, $chunklen, $ending) ); 21 22 23// Calling chunk_split() with default ending string 24echo "-- Testing chunk_split() with default ending string --\n"; 25var_dump( chunk_split($str, $chunklen) ); 26 27 28//Calling chunk_split() with default chunklen and ending string 29echo "-- Testing chunk_split() with default chunklen and ending string --\n"; 30var_dump( chunk_split($str) ); 31 32echo "Done" 33?> 34--EXPECT-- 35*** Testing chunk_split() : basic functionality *** 36-- Testing chunk_split() with all possible arguments -- 37string(15) "Te##st##in##g##" 38-- Testing chunk_split() with default ending string -- 39string(15) "Te 40st 41in 42g 43" 44-- Testing chunk_split() with default chunklen and ending string -- 45string(9) "Testing 46" 47Done 48