global statement removal: hphp/test/zend [2/x]
[hiphop-php.git] / hphp / test / zend / good / ext / iconv / tests / iconv_substr_error2.php
blob45c7f2b221b03b7b291f837e6fe353e5a7097167
1 <?php
2 /* Prototype : string iconv_substr(string str, int offset, [int length, string charset])
3 * Description: Returns part of a string
4 * Source code: ext/iconv/iconv.c
5 */
7 /*
8 * Pass an unknown encoding to iconv_substr() to test behaviour
9 */
11 echo "*** Testing iconv_substr() : error conditions ***\n";
13 $str = 'Hello, world';
14 $start = 1;
15 $length = 5;
16 $encoding = 'unknown-encoding';
18 var_dump( iconv_substr($str, $start, $length, $encoding));
20 echo "Done";