1--TEST--
2Bug #36944 (strncmp & strncasecmp do not return false on negative string length)
3--FILE--
4<?php
5
6var_dump(strncmp("test ", "e", -1));
7var_dump(strncmp("test ", "e", 10));
8var_dump(strncmp("test ", "e", 0));
9
10var_dump(strncasecmp("test ", "E", -1));
11var_dump(strncasecmp("test ", "E", 10));
12var_dump(strncasecmp("test ", "E", 0));
13
14echo "Done\n";
15?>
16--EXPECTF--
17Warning: Length must be greater than or equal to 0 in %s on line %d
18bool(false)
19int(%d)
20int(0)
21
22Warning: Length must be greater than or equal to 0 in %s on line %d
23bool(false)
24int(%d)
25int(0)
26Done
27