1--TEST--
2stream_get_contents() with negative max length
3--FILE--
4<?php
5
6$tmp = tmpfile();
7fwrite($tmp, "abcd");
8var_dump(stream_get_contents($tmp, 2, 1));
9var_dump(stream_get_contents($tmp, -2));
10
11?>
12--EXPECTF--
13string(2) "bc"
14
15Warning: stream_get_contents(): Length must be greater than or equal to zero, or -1 in %s on line %d
16bool(false)
17