global statement removal: hphp/test/zend [2/x]
[hiphop-php.git] / hphp / test / zend / good / ext / iconv / tests / iconv_strpos_error2.php
blob5833470af4bd39a7ae6fd73a7b1c55630cc78cac
1 <?php
2 /* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
3 * Description: Find position of first occurrence of a string within another
4 * Source code: ext/iconv/iconv.c
5 */
7 /*
8 * Pass an unknown encoding to iconv_strpos() to test behaviour
9 */
11 echo "*** Testing iconv_strpos() : error conditions ***\n";
12 $haystack = 'Hello, world';
13 $needle = 'world';
14 $offset = 2;
15 $encoding = 'unknown-encoding';
17 var_dump( iconv_strpos($haystack, $needle, $offset, $encoding) );
19 echo "Done";