1--TEST--
2strr[i]pos() function with negative offset
3--FILE--
4<?php
5	var_dump(strrpos("haysthack", 'ha', -9));
6	var_dump(strrpos("haystack", 'h', -8));
7	var_dump(strrpos("haystack", 'k', -1));
8	var_dump(strrpos("haystack", "ka", -1));
9	var_dump(strrpos("haystack", 'a', -3));
10	var_dump(strrpos("haystack", 'a', -4));
11	var_dump(@strrpos("haystack", 'h', -9));
12
13	var_dump(strripos("HAYSTHACk", 'ha', -9));
14	var_dump(strripos("HAYSTACK", 'h', -8));
15	var_dump(strripos("HAYSTACK", 'k', -1));
16	var_dump(strripos("HAYSTACK", "ka", -1));
17	var_dump(strripos("HAYSTACK", 'a', -3));
18	var_dump(strripos("HAYSTACK", 'a', -4));
19	var_dump(@strripos("HAYSTACK", 'h', -9));
20?>
21--EXPECT--
22int(0)
23int(0)
24int(7)
25bool(false)
26int(5)
27int(1)
28bool(false)
29int(0)
30int(0)
31int(7)
32bool(false)
33int(5)
34int(1)
35bool(false)
36