Home
last modified time | relevance | path

Searched refs:strncasecmp (Results 1 – 25 of 91) sorted by relevance

1234

/PHP-5.6/ext/standard/tests/strings/
H A Dstrncasecmp_basic.phpt2 Test strncasecmp() function : basic functionality
12 echo "-- Testing strncasecmp() with single quoted string --\n";
13 var_dump( strncasecmp('Hello', 'Hello', 5) ); //expected: int(0)
17 echo "-- Testing strncasecmp() with double quoted string --\n";
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
34 -- Testing strncasecmp\(\) with single quoted string --
38 -- Testing strncasecmp\(\) with double quoted string --
[all …]
H A Dstrncasecmp_error.phpt2 Test strncasecmp() function : error conditions
10 echo "*** Testing strncasecmp() function: error conditions ***\n";
16 echo "\n-- Testing strncasecmp() function with Zero arguments --";
17 var_dump( strncasecmp() );
20 var_dump( strncasecmp($str1) );
21 var_dump( strncasecmp($str1, $str2) );
24 var_dump( strncasecmp($str1, $str2, $len, $extra_arg) );
28 var_dump( strncasecmp($str1, $str2, $len) );
32 *** Testing strncasecmp() function: error conditions ***
34 -- Testing strncasecmp() function with Zero arguments --
[all …]
H A Dstrncasecmp_variation5.phpt2 Test strncasecmp() function : usage variations - unexpected values for 'len'
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
12 echo "*** Test strncasecmp() function: unexpected values for 'len' ***\n";
83 /* loop through each element of the array and check the working of strncasecmp() */
88 var_dump( strncasecmp($str1, $str2, $len) );
96 *** Test strncasecmp() function: unexpected values for 'len' ***
113 Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
117 Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
121 Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
125 Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d
[all …]
H A Dstrncasecmp_variation7.phpt2 Test strncasecmp() function : usage variations - binary safe
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with null terminated strings and binary values passed to 'str1' & 's…
12 echo "*** Test strncasecmp() function: with null terminated strings and binary inputs ***\n";
18 var_dump( strncasecmp($str1, $str2, 12) );
19 var_dump( strncasecmp($str3, "Hello,world", 12) );
24 *** Test strncasecmp() function: with null terminated strings and binary inputs ***
H A Dstrncasecmp_variation3.phpt2 Test strncasecmp() function: usage variations - various lengths
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() with various lengths */
12 echo "*** Test strncasecmp() function: with different lengths ***\n";
19 var_dump( strncasecmp($str1, $str2, $len) );
24 *** Test strncasecmp() function: with different lengths ***
H A Dstrncasecmp_variation10.phpt2 Test strncasecmp() function : usage variations - unexpected values for 'str1'
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with the unexpected inputs for 'str1' */
12 echo "*** Testing strncasecmp() function: with unexpected values for 'str1' ***\n";
86 /* loop through each element of the array and check the working of strncasecmp() */
92 var_dump( strncasecmp($str1, "string", $len) );
101 *** Testing strncasecmp() function: with unexpected values for 'str1' ***
134 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
140 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
146 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89
[all …]
H A Dstrncasecmp_variation4.phpt2 Test strncasecmp() function : usage variations - unexpected values for 'str1' & 'str2'
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with the unexpected inputs for 'str1' and 'str2' */
86 /* loop through each element of the array and check the working of strncasecmp() */
93 var_dump( strncasecmp($str1, $str2, $len) );
102 *** Testing strncasecmp() function: with unexpected values for 'str1' and 'str2' ***
135 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
141 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
147 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
153 Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d
[all …]
H A Dstrncasecmp_variation8.phpt2 Test strncasecmp() function: usage variations - single quoted strings
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with various single quoted strings for 'str1', 'str2' */
12 echo "*** Test strncasecmp() function: with single quoted strings ***\n";
24 … var_dump( strncasecmp( $strings[$index1], $strings[$index2], (strlen($strings[$index1]) + 1) ) );
31 \*\*\* Test strncasecmp\(\) function: with single quoted strings \*\*\*
H A Dstrncasecmp_variation1.phpt2 Test strncasecmp() function: usage variations - case-sensitivity
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with upper-case and lower-case alphabets as inputs for 'str1' and 's…
12 echo "*** Test strncasecmp() function: with alphabets ***\n";
15 …var_dump( strncasecmp( chr($ASCII), chr($ASCII), 1 ) ); //comparing uppercase letter with corresp…
16 …var_dump( strncasecmp( chr($ASCII), chr($ASCII + 32), 1 ) ); //comparing uppercase letter with co…
21 …var_dump( strncasecmp( chr($ASCII), chr($ASCII), 1 ) ); //comparing lowercase letter with corresp…
22 …var_dump( strncasecmp( chr($ASCII), chr($ASCII - 32), 1 ) ); //comparing lowercase letter with co…
27 *** Test strncasecmp() function: with alphabets ***
H A Dstrncasecmp_variation2.phpt2 Test strncasecmp() function: usage variations - double quoted strings
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with various double quoted strings for 'str1', 'str2' */
12 echo "*** Test strncasecmp() function: with double quoted strings ***\n";
25 … var_dump( strncasecmp( $strings[$index1], $strings[$index2], (strlen($strings[$index1]) + 1) ) );
32 \*\*\* Test strncasecmp\(\) function: with double quoted strings \*\*\*
H A Dstrncasecmp_variation11.phpt2 Test strncasecmp() function : usage variations - unexpected values for 'str2'
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with the unexpected inputs for 'str2' */
12 echo "*** Testing strncasecmp() function: with unexpected values for 'str2' ***\n";
86 /* loop through each element of the array and check the working of strncasecmp() */
93 var_dump( strncasecmp("string", $str2, $len) );
102 *** Testing strncasecmp() function: with unexpected values for 'str2' ***
135 Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
141 Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
147 Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d
[all …]
H A Dstrncasecmp_variation9.phpt2 Test strncasecmp() function: usage variations - heredoc strings
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with here-doc strings for 'str1', 'str2' */
12 echo "*** Test strncasecmp() function: with here-doc strings ***\n";
71 var_dump( strncasecmp( $strings[$index1], $strings[$index1], strlen($strings[$index1]) ) );
72 var_dump( strncasecmp( $strings[$index1], $strings[$index2], strlen($strings[$index1]) ) );
77 *** Test strncasecmp() function: with here-doc strings ***
H A Dbug36944.phpt2 Bug #36944 (strncmp & strncasecmp do not return false on negative string length)
10 var_dump(strncasecmp("test ", "E", -1));
11 var_dump(strncasecmp("test ", "E", 10));
12 var_dump(strncasecmp("test ", "E", 0));
H A Dstrncasecmp_variation6.phpt2 Test strncasecmp() function : usage variations - binary safe - all ASCII chars
5 /* Prototype : int strncasecmp ( string $str1, string $str2, int $len );
10 /* Test strncasecmp() function with binary values passed to 'str1' & 'str2' */
12 echo "*** Test strncasecmp() function: with binary inputs ***\n";
16 …p through to get all 256 character's equivelent binary value, and check working of strncasecmp() */
22 var_dump( strncasecmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(0)
23 var_dump( strncasecmp($str1, $str2, 4) ); //comparing only 4-bits; expected: int(0)
30 var_dump( strncasecmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(1)
35 *** Test strncasecmp() function: with binary inputs ***
/PHP-5.6/Zend/tests/
H A D006.phpt2 strncasecmp() tests
6 var_dump(strncasecmp(""));
7 var_dump(strncasecmp("", "", -1));
8 var_dump(strncasecmp("aef", "dfsgbdf", 0));
9 var_dump(strncasecmp("aef", "dfsgbdf", 10));
10 var_dump(strncasecmp("qwe", "qwer", 3));
11 var_dump(strncasecmp("qwerty", "QweRty", 6));
12 var_dump(strncasecmp("qwErtY", "qwer", 7));
13 var_dump(strncasecmp("q123", "Q123", 3));
14 var_dump(strncasecmp("01", "01", 1000));
[all …]
/PHP-5.6/ext/filter/
H A Dlogical_filters.c262 if (strncasecmp(str, "on", 2) == 0) { in php_filter_boolean()
264 } else if (strncasecmp(str, "no", 2) == 0) { in php_filter_boolean()
271 if (strncasecmp(str, "yes", 3) == 0) { in php_filter_boolean()
273 } else if (strncasecmp(str, "off", 3) == 0) { in php_filter_boolean()
280 if (strncasecmp(str, "true", 4) == 0) { in php_filter_boolean()
287 if (strncasecmp(str, "false", 5) == 0) { in php_filter_boolean()
735 …if (Z_STRLEN_P(value) >=2 && (!strncasecmp("FC", Z_STRVAL_P(value), 2) || !strncasecmp("FD", Z_STR… in php_filter_validate_ip()
756 !strncasecmp("fe8", Z_STRVAL_P(value), 3) || in php_filter_validate_ip()
757 !strncasecmp("fe9", Z_STRVAL_P(value), 3) || in php_filter_validate_ip()
758 !strncasecmp("fea", Z_STRVAL_P(value), 3) || in php_filter_validate_ip()
[all …]
/PHP-5.6/ext/pdo/tests/
H A Dbug_43130.phpt8 if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sql…
9 if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql…
10 if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci drive…
11 if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for…
/PHP-5.6/ext/standard/
H A Dphp_fopen_wrapper.c188 if (!strncasecmp(path, "php://", 6)) { in php_stream_url_wrap_php()
192 if (!strncasecmp(path, "temp", 4)) { in php_stream_url_wrap_php()
195 if (!strncasecmp(path, "/maxmemory:", 11)) { in php_stream_url_wrap_php()
290 } else if (!strncasecmp(path, "fd/", 3)) { in php_stream_url_wrap_php()
337 } else if (!strncasecmp(path, "filter/", 7)) { in php_stream_url_wrap_php()
361 if (!strncasecmp(p, "read=", 5)) { in php_stream_url_wrap_php()
363 } else if (!strncasecmp(p, "write=", 6)) { in php_stream_url_wrap_php()
H A Dhttp_fopen_wrapper.c157 …if (strncasecmp(resource->scheme, "http", sizeof("http")) && strncasecmp(resource->scheme, "https"… in php_stream_url_wrap_http_ex()
711 …&& ( tmp_line_len < sizeof("HTTP/1") - 1 || strncasecmp(tmp_line, "HTTP/1", sizeof("HTTP/1") - 1) ) in php_stream_url_wrap_http_ex()
779 if (!strncasecmp(http_header_line, "Location: ", 10)) { in php_stream_url_wrap_http_ex()
792 } else if (!strncasecmp(http_header_line, "Content-Type: ", 14)) { in php_stream_url_wrap_http_ex()
794 } else if (!strncasecmp(http_header_line, "Content-Length: ", 16)) { in php_stream_url_wrap_http_ex()
797 …} else if (!strncasecmp(http_header_line, "Transfer-Encoding: chunked", sizeof("Transfer-Encoding:… in php_stream_url_wrap_http_ex()
851 if (strlen(location)<8 || (strncasecmp(location, "http://", sizeof("http://")-1) && in php_stream_url_wrap_http_ex()
852 strncasecmp(location, "https://", sizeof("https://")-1) && in php_stream_url_wrap_http_ex()
853 strncasecmp(location, "ftp://", sizeof("ftp://")-1) && in php_stream_url_wrap_http_ex()
854 strncasecmp(location, "ftps://", sizeof("ftps://")-1))) in php_stream_url_wrap_http_ex()
[all …]
H A Dbrowscap.c176 if ((Z_STRLEN_P(arg2) == 2 && !strncasecmp(Z_STRVAL_P(arg2), "on", sizeof("on") - 1)) || in php_browscap_parser_cb()
177 (Z_STRLEN_P(arg2) == 3 && !strncasecmp(Z_STRVAL_P(arg2), "yes", sizeof("yes") - 1)) || in php_browscap_parser_cb()
178 (Z_STRLEN_P(arg2) == 4 && !strncasecmp(Z_STRVAL_P(arg2), "true", sizeof("true") - 1)) in php_browscap_parser_cb()
183 (Z_STRLEN_P(arg2) == 2 && !strncasecmp(Z_STRVAL_P(arg2), "no", sizeof("no") - 1)) || in php_browscap_parser_cb()
184 (Z_STRLEN_P(arg2) == 3 && !strncasecmp(Z_STRVAL_P(arg2), "off", sizeof("off") - 1)) || in php_browscap_parser_cb()
185 (Z_STRLEN_P(arg2) == 4 && !strncasecmp(Z_STRVAL_P(arg2), "none", sizeof("none") - 1)) || in php_browscap_parser_cb()
186 (Z_STRLEN_P(arg2) == 5 && !strncasecmp(Z_STRVAL_P(arg2), "false", sizeof("false") - 1)) in php_browscap_parser_cb()
/PHP-5.6/sapi/phpdbg/
H A Dphpdbg.h52 # undef strncasecmp
54 # define strncasecmp _strnicmp macro
/PHP-5.6/ext/zlib/
H A Dzlib_fopen_wrapper.c125 if (strncasecmp("compress.zlib://", path, 16) == 0) { in php_stream_gzopen()
127 } else if (strncasecmp("zlib:", path, 5) == 0) { in php_stream_gzopen()
/PHP-5.6/Zend/
H A Dzend_config.w32.h55 #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n) macro
H A Dzend_vm_gen.php425 if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
427 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HAN…
429 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_H…
446 if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
448 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HAN…
450 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_H…
467 if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
469 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HAN…
471 …} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_H…
/PHP-5.6/ext/soap/
H A Dphp_http.c135 strncasecmp(s, "host", sizeof("host")-1) != 0) && in http_context_headers()
137 strncasecmp(s, "connection", sizeof("connection")-1) != 0) && in http_context_headers()
139 strncasecmp(s, "user-agent", sizeof("user-agent")-1) != 0) && in http_context_headers()
141 strncasecmp(s, "content-length", sizeof("content-length")-1) != 0) && in http_context_headers()
143 strncasecmp(s, "content-type", sizeof("content-type")-1) != 0) && in http_context_headers()
146 strncasecmp(s, "cookie", sizeof("cookie")-1) != 0) && in http_context_headers()
149 strncasecmp(s, "authorization", sizeof("authorization")-1) != 0) && in http_context_headers()
1031 if (strncasecmp(connection, "close", sizeof("close")-1) == 0) { in make_http_soap_request()
1040 if (strncasecmp(connection, "close", sizeof("close")-1) == 0) { in make_http_soap_request()
1347 if (strncasecmp(pos, type, typelen) == 0) { in get_http_header_value()
[all …]

Completed in 51 milliseconds

1234