}
if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) {
- zend_argument_value_error(2, "must be a valid mode. Only 'w' and 'r' are supported");
+ zend_argument_value_error(2, "must be either 'r' or 'w'");
RETURN_THROWS();
}
?>
--EXPECTF--
-bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
+bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
Warning: bzopen(): Filename cannot be empty in %s on line %d
bool(false)
Warning: bzopen(): Filename cannot be empty in %s on line %d
bool(false)
-bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
-bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
+bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
+bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d
bool(false)
/* GD2 image format types */
REGISTER_LONG_CONSTANT("IMG_GD2_RAW", GD2_FMT_RAW, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORIZONTAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT);
gdImageFlipVertical(im);
break;
- case GD_FLIP_HORINZONTAL:
+ case GD_FLIP_HORIZONTAL:
gdImageFlipHorizontal(im);
break;
break;
default:
- zend_argument_value_error(2, "must be a valid mode");
+ zend_argument_value_error(2, "must be either IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
RETURN_THROWS();
}
void gdImageFlipVertical(gdImagePtr im);
void gdImageFlipBoth(gdImagePtr im);
-#define GD_FLIP_HORINZONTAL 1
+#define GD_FLIP_HORIZONTAL 1
#define GD_FLIP_VERTICAL 2
#define GD_FLIP_BOTH 3
var_dump(iconv_strpos("", "string"));
?>
---EXPECTF--
+--EXPECT--
bool(false)
bool(false)
int(5)
int(5)
-Offset not contained in string
+strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
bool(false)
int(7)
int(7)
php_error_docref(NULL, E_WARNING, "Conversion error");
break;
case MBFL_ERROR_OFFSET:
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
break;
default:
- zend_value_error("Unknown error in mb_strpos");
+ zend_value_error("mb_strpos(): Unknown error");
break;
}
}
-- Offset is 22 --
--Multibyte String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--ASCII String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Offset is 53 --
--Multibyte String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--ASCII String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Offset is 54 --
--Multibyte String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--ASCII String:--
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--EXPECT--
-- Offset is -25 --
Multibyte String:
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
ASCII String:
mb_strrpos:
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
strrpos:
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Offset is -24 --
Multibyte String:
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
ASCII String:
mb_strrpos:
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
strrpos:
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Offset is -13 --
Multibyte String:
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
bool(false)
> Offset: -3
> Offset: -6
int(8)
> Offset: -20
-Offset not contained in string
+strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- mb_strpos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
bool(false)
> Offset: -3
> Offset: -6
int(8)
> Offset: -20
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- stripos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
bool(false)
> Offset: -3
> Offset: -6
int(8)
> Offset: -20
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- mb_stripos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
bool(false)
> Offset: -3
> Offset: -6
int(8)
> Offset: -20
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- strrpos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
int(8)
> Offset: -3
> Offset: -6
int(4)
> Offset: -20
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- mb_strrpos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
int(8)
> Offset: -3
> Offset: -6
int(4)
> Offset: -20
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- strripos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
int(8)
> Offset: -3
> Offset: -6
int(4)
> Offset: -20
-Offset not contained in string
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
------- mb_strripos -----------
> Offset: 11
bool(false)
> Offset: 12
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
> Offset: -1
int(8)
> Offset: -3
> Offset: -6
int(4)
> Offset: -20
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(5)
-- ASCII string with out of bound positive offset --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- ASCII string with out of bound negative offset --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string without offset --
int(0)
int(19)
-- Multi-byte string with out of bound positive offset --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string with out of bound negative offset --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--EXPECT--
String len: 42
== INVALID OFFSET ==
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: -30 --**
-- ASCII String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: -20 --**
-- ASCII String --
**-- Offset is: 30 --**
-- ASCII String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 40 --**
-- ASCII String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 50 --**
-- ASCII String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 60 --**
-- ASCII String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(5)
-- ASCII string with out of bound positive offset --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- ASCII string with out of bound negative offset --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string without offset --
int(0)
int(19)
-- Multi-byte string with out of bound positive offset --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string with out of bound negative offset --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--EXPECT--
String len: 42
== INVALID OFFSET ==
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
?>
--EXPECT--
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: -30 --**
-- ASCII String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: -20 --**
-- ASCII String --
**-- Offset is: 30 --**
-- ASCII String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 40 --**
-- ASCII String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 50 --**
-- ASCII String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 60 --**
-- ASCII String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(5)
-- ASCII string with out of bound positive offset --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- ASCII string with out of bound negative offset --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string without offset --
int(21)
int(19)
-- Multi-byte string with out of bound positive offset --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string with out of bound negative offset --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 30 --**
-- ASCII String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 40 --**
-- ASCII String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 50 --**
-- ASCII String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
**-- Offset is: 60 --**
-- ASCII String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--Multibyte String --
-Offset not contained in string
+mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(5)
-- ASCII string with out of bound positive offset --
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- ASCII string with out of bound negative offset --
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string without offset --
int(21)
int(19)
-- Multi-byte string with out of bound positive offset --
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Multi-byte string with out of bound negative offset --
-Offset not contained in string
+mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
zval rv;
if (!object) {
- zend_type_error("No object provided for getValue() on instance property");
+ zend_argument_type_error(1, "must be provided for instance properties");
RETURN_THROWS();
}
int retval;
if (!object) {
- zend_type_error("No object provided for isInitialized() on instance property");
+ zend_argument_type_error(1, "must be provided for instance properties");
RETURN_THROWS();
}
Given object is not an instance of the class this property was declared in
Missing instance:
-No object provided for getValue() on instance property
+ReflectionProperty::getValue(): Argument #1 ($object) must be provided for instance properties
Object type:
bool(false)
Given object is not an instance of the class this property was declared in
-No object provided for isInitialized() on instance property
+ReflectionProperty::isInitialized(): Argument #1 ($object) must be provided for instance properties
Class with __isset:
bool(false)
bool(false)
ZEND_PARSE_PARAMETERS_END();
if (mode != COUNT_NORMAL && mode != COUNT_RECURSIVE) {
- zend_argument_value_error(2, "must be a valid mode");
+ zend_argument_value_error(2, "must be either COUNT_NORMAL or COUNT_RECURSIVE");
RETURN_THROWS();
}
* Specialized conversion rules for array_column() function
*/
static inline
-zend_bool array_column_param_helper(zval *param,
- const char *name) {
+zend_bool array_column_param_helper(zval *param, int parameter_number) {
switch (Z_TYPE_P(param)) {
case IS_DOUBLE:
convert_to_long_ex(param);
return 1;
default:
- zend_type_error("The %s key should be either a string or an integer", name);
+ zend_argument_type_error(parameter_number, "must be of type string|int, %s given", zend_zval_type_name(param));
return 0;
}
}
Z_PARAM_ZVAL_EX(index, 1, 0)
ZEND_PARSE_PARAMETERS_END();
- if ((column && !array_column_param_helper(column, "column")) ||
- (index && !array_column_param_helper(index, "index"))) {
- return;
+ if ((column && !array_column_param_helper(column, 2)) ||
+ (index && !array_column_param_helper(index, 3))) {
+ RETURN_THROWS();
}
array_init_size(return_value, zend_hash_num_elements(input));
FETCH_DIRP();
if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) {
- zend_type_error("%d is not a valid Directory resource", dirp->res->handle);
+ zend_argument_type_error(1, "must be a valid Directory resource");
RETURN_THROWS();
}
FETCH_DIRP();
if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) {
- zend_type_error("%d is not a valid Directory resource", dirp->res->handle);
+ zend_argument_type_error(1, "must be a valid Directory resource");
RETURN_THROWS();
}
offset += (zend_long)ZSTR_LEN(haystack);
}
if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
offset += (zend_long)ZSTR_LEN(haystack);
}
if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
if (offset >= 0) {
if ((size_t)offset > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
p = ZSTR_VAL(haystack) + (size_t)offset;
e = ZSTR_VAL(haystack) + ZSTR_LEN(haystack);
} else {
if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
char lowered;
if (offset >= 0) {
if ((size_t)offset > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
p = ZSTR_VAL(haystack) + (size_t)offset;
} else {
p = ZSTR_VAL(haystack);
if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
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);
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
p = ZSTR_VAL(haystack_dup) + offset;
} else {
if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
zend_string_release_ex(haystack_dup, 0);
- zend_value_error("Offset not contained in string");
+ zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_END();
if (mult < 0) {
- zend_value_error("Second argument has to be greater than or equal to 0");
+ zend_argument_value_error(2, "must be greater than or equal to 0");
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_END();
if (mymode < 0 || mymode > 4) {
- zend_value_error("Unknown mode");
+ zend_argument_value_error(2, "must be between 1 and 4 (inclusive)");
RETURN_THROWS();
}
*** Testing array_column() : error conditions ***
-- Testing array_column() column key parameter should be a string or an integer (testing bool) --
-The column key should be either a string or an integer
+array_column(): Argument #2 ($column_key) must be of type string|int, bool given
-- Testing array_column() column key parameter should be a string or integer (testing array) --
-The column key should be either a string or an integer
+array_column(): Argument #2 ($column_key) must be of type string|int, array given
-- Testing array_column() index key parameter should be a string or an integer (testing bool) --
-The index key should be either a string or an integer
+array_column(): Argument #3 ($index_key) must be of type string|int, bool given
-- Testing array_column() index key parameter should be a string or integer (testing array) --
-The index key should be either a string or an integer
+array_column(): Argument #3 ($index_key) must be of type string|int, array given
DONE
int(0)
int(0)
int(0)
-count(): Argument #2 ($mode) must be a valid mode
-count(): Argument #2 ($mode) must be a valid mode
-count(): Argument #2 ($mode) must be a valid mode
+count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE
+count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE
+count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE
int(0)
int(0)
int(0)
resource(%d) of type (stream)
-- Try to close the file pointer using closedir() --
-%d is not a valid Directory resource
+closedir(): Argument #1 ($dir_handle) must be a valid Directory resource
-- Check file pointer: --
resource(%d) of type (stream)
-- Open a file using fopen --
resource(%d) of type (stream)
-%d is not a valid Directory resource
+rewinddir(): Argument #1 ($dir_handle) must be a valid Directory resource
-- Check if rewinddir() has repositioned the file pointer --
rewinddir() does not work on file pointers
?>
--EXPECTF--
Invalid max_depth:
-max_depth should be int
-max_depth cannot be negative
+unserialize(): 'max_depth' option must be of type int, string given
+unserialize(): 'max_depth' option must be greater than or equal to 0
Array:
bool(true)
Warning: substr_compare(): The start position cannot exceed initial string length in %s on line %d
bool(false)
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(2)
string(8) "abcdeabc"
bool(false)
}
string(18) " Rabcdefghimnorstu"
string(476) "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f5051535455565758595a5b5c5d5e5f606a6b6c7071767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"
-Unknown mode
+count_chars(): Argument #2 ($mode) must be between 1 and 4 (inclusive)
*** Testing stripos() function: error conditions ***
-- Offset beyond the end of the string --
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Offset before the start of the string --
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
*** Done ***
bool(false)
-- Iteration 16 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 17 --
int(0)
bool(false)
-- Iteration 18 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 19 --
int(0)
bool(false)
-- Iteration 20 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 21 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 22 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 23 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 24 --
TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given
TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given
-- Iteration 25 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 26 --
int(0)
-ValueError: Offset not contained in string
+ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
*** Done ***
*** Testing stripos() function: with heredoc strings ***
-- With empty heredoc string --
int(0)
-Offset not contained in string
+stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(0)
int(0)
*** Done ***
?>
--EXPECT--
strripos(): Argument #3 ($offset) must be of type int, float given
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
Done
bool(false)
int(5)
int(1)
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(0)
int(0)
int(7)
bool(false)
int(5)
int(1)
-Offset not contained in string
+strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
?>
--EXPECT--
strrpos(): Argument #3 ($offset) must be of type int, float given
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
Done
bool(false)
-- Iteration 16 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 17 --
int(0)
bool(false)
-- Iteration 18 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 19 --
int(0)
bool(false)
-- Iteration 20 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 21 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 22 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 23 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 24 --
TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given
TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given
-- Iteration 25 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-- Iteration 26 --
int(0)
-ValueError: Offset not contained in string
+ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
*** Done ***
*** Testing strrpos() function: with heredoc strings ***
-- With empty heredoc string --
int(0)
-Offset not contained in string
+strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(0)
int(0)
*** Done ***
ZEND_PARSE_PARAMETERS_END();
if (NULL == (pzbucket = zend_hash_str_find(Z_OBJPROP_P(zobject), "bucket", sizeof("bucket")-1))) {
- zend_value_error("Object has no bucket property");
+ zend_argument_value_error(2, "must be an object that has a 'bucket' property");
RETURN_THROWS();
}
max_depth = zend_hash_str_find_deref(Z_ARRVAL_P(options), "max_depth", sizeof("max_depth") - 1);
if (max_depth) {
if (Z_TYPE_P(max_depth) != IS_LONG) {
- zend_type_error("max_depth should be int");
+ zend_type_error("unserialize(): 'max_depth' option must be of type int, %s given", zend_zval_type_name(max_depth));
goto cleanup;
}
if (Z_LVAL_P(max_depth) < 0) {
- zend_value_error("max_depth cannot be negative");
+ zend_value_error("unserialize(): 'max_depth' option must be greater than or equal to 0");
goto cleanup;
}
bool(false)
Error:
-Kind must be of type int, string or array
-Kind array must have elements of type int or string
+PhpToken::is(): Argument #1 ($kind) must be of type string|int|array, float given
+PhpToken::is(): Argument #1 ($kind) must only have elements of type string|int, float given
Typed property PhpToken::$id must not be accessed before initialization
Typed property PhpToken::$text must not be accessed before initialization
Typed property PhpToken::$id must not be accessed before initialization
RETURN_TRUE;
}
} else {
- zend_type_error("Kind array must have elements of type int or string");
+ zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_type_name(entry));
RETURN_THROWS();
}
} ZEND_HASH_FOREACH_END();
RETURN_FALSE;
} else {
- zend_type_error("Kind must be of type int, string or array");
+ zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_type_name(kind));
RETURN_THROWS();
}
}