Lines Matching refs:strncmp
2 Test strncmp() function : basic functionality
5 echo "*** Testing strncmp() function: basic functionality ***\n";
7 echo "-- Testing strncmp() with single quoted string --\n";
8 var_dump( strncmp('Hello', 'Hello', 5) ); //expected: int(0)
9 var_dump( strncmp('Hello', 'Hi', 5) ); //expected: value < 0
10 var_dump( strncmp('Hi', 'Hello', 5) ); //expected: value > 0
12 echo "-- Testing strncmp() with double quoted string --\n";
13 var_dump( strncmp("Hello", "Hello", 5) ); //expected: int(0)
14 var_dump( strncmp("Hello", "Hi", 5) ); //expected: value < 0
15 var_dump( strncmp("Hi", "Hello", 5) ); //expected: value > 0
17 echo "-- Testing strncmp() with here-doc string --\n";
21 var_dump( strncmp($str, "Hello", 5) ); //expected: int(0)
22 var_dump( strncmp($str, "Hi", 5) ); //expected: value < 0
23 var_dump( strncmp("Hi", $str, 5) ); //expected: value > 0
28 \*\*\* Testing strncmp\(\) function: basic functionality \*\*\*
29 -- Testing strncmp\(\) with single quoted string --
33 -- Testing strncmp\(\) with double quoted string --
37 -- Testing strncmp\(\) with here-doc string --