xref: /PHP-7.2/Zend/tests/004.phpt (revision 17ccbeec)
1--TEST--
2strncmp() tests
3--FILE--
4<?php
5
6var_dump(strncmp("", ""));
7var_dump(strncmp("", "", 100));
8var_dump(strncmp("aef", "dfsgbdf", -1));
9var_dump(strncmp("fghjkl", "qwer", 0));
10var_dump(strncmp("qwerty", "qwerty123", 6));
11var_dump(strncmp("qwerty", "qwerty123", 7));
12
13echo "Done\n";
14?>
15--EXPECTF--
16Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d
17NULL
18int(0)
19
20Warning: Length must be greater than or equal to 0 in %s on line %d
21bool(false)
22int(0)
23int(0)
24int(-1)
25Done
26