--TEST-- Test iconv_strpos() function : usage variations - Pass different integers as $offset argument --EXTENSIONS-- iconv --INI-- error_reporting=E_ALL & ~E_DEPRECATED --FILE-- getMessage(), "\n"; } echo "--Multibyte String --\n"; try { var_dump(iconv_strpos($string_mb, $needle_mb, $i, 'UTF-8')); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } } echo "Done"; ?> --EXPECT-- *** Testing iconv_strpos() : usage variations *** **-- Offset is: -30 --** -- ASCII String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: -20 --** -- ASCII String -- int(9) --Multibyte String -- int(9) **-- Offset is: -10 --** -- ASCII String -- int(20) --Multibyte String -- int(20) **-- Offset is: 0 --** -- ASCII String -- int(9) --Multibyte String -- int(9) **-- Offset is: 10 --** -- ASCII String -- int(20) --Multibyte String -- int(20) **-- Offset is: 20 --** -- ASCII String -- int(20) --Multibyte String -- int(20) **-- Offset is: 30 --** -- ASCII String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 40 --** -- ASCII String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 50 --** -- ASCII String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 60 --** -- ASCII String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) Done