xref: /PHP-7.4/Zend/tests/006.phpt (revision 782352c5)
1--TEST--
2strncasecmp() tests
3--FILE--
4<?php
5
6var_dump(strncasecmp(""));
7var_dump(strncasecmp("", "", -1));
8var_dump(strncasecmp("aef", "dfsgbdf", 0));
9var_dump(strncasecmp("aef", "dfsgbdf", 10));
10var_dump(strncasecmp("qwe", "qwer", 3));
11var_dump(strncasecmp("qwerty", "QweRty", 6));
12var_dump(strncasecmp("qwErtY", "qwer", 7));
13var_dump(strncasecmp("q123", "Q123", 3));
14var_dump(strncasecmp("01", "01", 1000));
15
16echo "Done\n";
17?>
18--EXPECTF--
19Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d
20NULL
21
22Warning: Length must be greater than or equal to 0 in %s on line %d
23bool(false)
24int(0)
25int(-3)
26int(0)
27int(0)
28int(2)
29int(0)
30int(0)
31Done
32