1--TEST--
2Test strncasecmp() function: usage variations - various lengths
3--FILE--
4<?php
5/* Test strncasecmp() with various lengths */
6
7echo "*** Test strncasecmp() function: with different lengths ***\n";
8/* definitions of required variables */
9$str1 = "Hello, World\n";
10$str2 = "Hello, world\n";
11
12/* loop through to compare the strings, for various length values */
13for($len = strlen($str1); $len >= 0; $len--) {
14  var_dump( strncasecmp($str1, $str2, $len) );
15}
16echo "*** Done ***\n";
17?>
18--EXPECT--
19*** Test strncasecmp() function: with different lengths ***
20int(0)
21int(0)
22int(0)
23int(0)
24int(0)
25int(0)
26int(0)
27int(0)
28int(0)
29int(0)
30int(0)
31int(0)
32int(0)
33int(0)
34*** Done ***
35