1--TEST--
2Bug #77853: Inconsistent substr_compare behaviour with empty haystack
3--FILE--
4<?php
5
6var_dump(substr_compare('', '', 0, 0));
7var_dump(substr_compare('', '', 0));
8
9var_dump(substr_compare('abc', '', 3, 0));
10var_dump(substr_compare('abc', '', 3));
11
12var_dump(substr_compare('abc', "\0", 3));
13
14?>
15--EXPECT--
16int(0)
17int(0)
18int(0)
19int(0)
20int(-1)
21