import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-strings / strncasecmp_error.php
blob5aab420dc3f0576d21b21675f96a4b1b09eeefc7
1 <?php
2 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
3 * Description: Binary safe case-insensitive string comparison of the first n characters
4 * Source code: Zend/zend_builtin_functions.c
5 */
7 echo "*** Testing strncasecmp() function: error conditions ***\n";
8 $str1 = 'string_val';
9 $str2 = 'string_val';
10 $len = 10;
11 $extra_arg = 10;
13 echo "\n-- Testing strncasecmp() function with Zero arguments --";
14 var_dump( strncasecmp() );
16 echo "\n-- Testing strncasecmp() function with less than expected number of arguments --";
17 var_dump( strncasecmp($str1) );
18 var_dump( strncasecmp($str1, $str2) );
20 echo "\n-- Testing strncasecmp() function with more than expected number of arguments --";
21 var_dump( strncasecmp($str1, $str2, $len, $extra_arg) );
23 echo "\n-- Testing strncasecmp() function with invalid argument --";
24 $len = -10;
25 var_dump( strncasecmp($str1, $str2, $len) );
26 echo "*** Done ***\n";