bool(false)
> Offset: 12
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
> Offset: -1
int(8)
int(4)
> Offset: -20
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
------- mb_strrpos -----------
bool(false)
> Offset: 12
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
> Offset: -1
int(8)
int(4)
> Offset: -20
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
------- mb_strripos -----------
if (offset >= 0) {
if ((size_t)offset > ZSTR_LEN(haystack)) {
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p = ZSTR_VAL(haystack) + (size_t)offset;
e = ZSTR_VAL(haystack) + ZSTR_LEN(haystack);
} else {
if (offset < -INT_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p = ZSTR_VAL(haystack);
char lowered;
if (offset >= 0) {
if ((size_t)offset > ZSTR_LEN(haystack)) {
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p = ZSTR_VAL(haystack) + (size_t)offset;
} else {
p = ZSTR_VAL(haystack);
if (offset < -INT_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
e = ZSTR_VAL(haystack) + (ZSTR_LEN(haystack) + (size_t)offset);
if (offset >= 0) {
if ((size_t)offset > ZSTR_LEN(haystack)) {
zend_string_release_ex(haystack_dup, 0);
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p = ZSTR_VAL(haystack_dup) + offset;
} else {
if (offset < -INT_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
zend_string_release_ex(haystack_dup, 0);
- php_error_docref(NULL, E_WARNING, "Offset is greater than the length of haystack string");
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p = ZSTR_VAL(haystack_dup);
--EXPECTF--
strripos() expects parameter 3 to be int, float given
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset not contained in string in %s on line %d
bool(false)
Done
--EXPECTF--
strrpos() expects parameter 3 to be int, float given
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset not contained in string in %s on line %d
bool(false)
Done