1--TEST-- 2iconv_substr() with out of bounds offset 3--EXTENSIONS-- 4iconv 5--FILE-- 6<?php 7 8var_dump(iconv_substr("foo", 3)); 9var_dump(iconv_substr("foo", -3)); 10var_dump(iconv_substr("foo", 4)); 11var_dump(iconv_substr("foo", -4)); 12var_dump(iconv_substr("äöü", 3)); 13var_dump(iconv_substr("äöü", -3)); 14var_dump(iconv_substr("äöü", 4)); 15var_dump(iconv_substr("äöü", -4)); 16var_dump(iconv_substr("foo", 0, 3)); 17var_dump(iconv_substr("foo", 0, -3)); 18var_dump(iconv_substr("foo", 0, 4)); 19var_dump(iconv_substr("foo", 0, -4)); 20var_dump(iconv_substr("äöü", 0, 3)); 21var_dump(iconv_substr("äöü", 0, -3)); 22var_dump(iconv_substr("äöü", 0, 4)); 23var_dump(iconv_substr("äöü", 0, -4)); 24var_dump(iconv_substr("äöü", -4, 1)); 25var_dump(iconv_substr("äöü", -4, -1)); 26var_dump(iconv_substr("äöü", 2, -2)); 27 28?> 29--EXPECT-- 30string(0) "" 31string(3) "foo" 32string(0) "" 33string(3) "foo" 34string(0) "" 35string(6) "äöü" 36string(0) "" 37string(6) "äöü" 38string(3) "foo" 39string(0) "" 40string(3) "foo" 41string(0) "" 42string(6) "äöü" 43string(0) "" 44string(6) "äöü" 45string(0) "" 46string(2) "ä" 47string(4) "äö" 48string(0) "" 49