nlopess Sun Oct 7 14:00:20 2007 UTC Modified files: /php-src/ext/pcre/tests bug42737.phpt Log: add test for bug #42737. HEAD didnt have this bug, as it uses a smarter way to iterate over utf-8 chars http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug42737.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/pcre/tests/bug42737.phpt diff -u /dev/null php-src/ext/pcre/tests/bug42737.phpt:1.2 --- /dev/null Sun Oct 7 14:00:20 2007 +++ php-src/ext/pcre/tests/bug42737.phpt Sun Oct 7 14:00:20 2007 @@ -0,0 +1,19 @@ +--TEST-- +Bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines) +--FILE-- +<?php + +$string = chr(13).chr(10); + +$array = preg_split('//u', $string, - 1, PREG_SPLIT_NO_EMPTY); + +var_dump(array_map('ord', $array)); + +?> +--EXPECT-- +array(2) { + [0]=> + int(13) + [1]=> + int(10) +}
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php