php-src/ext/standard/tests/strings/bug42866.phpt

20 lines
352 B
Plaintext
Raw Normal View History

2007-11-21 02:24:47 +00:00
--TEST--
2008-05-14 13:13:02 +00:00
Bug #42866 (str_split() returns extra char when given string size is not multiple of length)
2007-11-21 02:24:47 +00:00
--FILE--
<?php
$str = 'Testing str_split()';
$split_length = 5;
var_dump( str_split($str, $split_length) );
?>
--EXPECT--
array(4) {
[0]=>
unicode(5) "Testi"
[1]=>
unicode(5) "ng st"
[2]=>
unicode(5) "r_spl"
[3]=>
unicode(4) "it()"
2008-05-14 13:13:02 +00:00
}