Lines Matching refs:strncasecmp
2 Test strncasecmp() function : basic functionality
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 echo "*** Testing strncasecmp() function: basic functionality ***\n";
12 echo "-- Testing strncasecmp() with single quoted string --\n";
13 var_dump( strncasecmp('Hello', 'Hello', 5) ); //expected: int(0)
14 var_dump( strncasecmp('Hello', 'Hi', 5) ); //expected: value < 0
15 var_dump( strncasecmp('Hi', 'Hello', 5) ); //expected: value > 0
17 echo "-- Testing strncasecmp() with double quoted string --\n";
18 var_dump( strncasecmp("Hello", "Hello", 5) ); //expected: int(0)
19 var_dump( strncasecmp("Hello", "Hi", 5) ); //expected: value < 0
20 var_dump( strncasecmp("Hi", "Hello", 5) ); //expected: value > 0
22 echo "-- Testing strncasecmp() with here-doc string --\n";
26 var_dump( strncasecmp($str, "Hello", 5) ); //expected: int(0)
27 var_dump( strncasecmp($str, "Hi", 5) ); //expected: value < 0
28 var_dump( strncasecmp("Hi", $str, 5) ); //expected: value > 0
33 \*\*\* Testing strncasecmp\(\) function: basic functionality \*\*\*
34 -- Testing strncasecmp\(\) with single quoted string --
38 -- Testing strncasecmp\(\) with double quoted string --
42 -- Testing strncasecmp\(\) with here-doc string --