diff --git a/README.md b/README.md index 1fe19ea..476e515 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,10 @@ The `Collection` class implements `ArrayAccess` and `Countable` interface intern * `empty()`, `count()` can be used on instance of `Collection`. * Elements can be traversed via `foreach()` keyword. -### 2.3 Comparing elements - -Some methods of `Collection` involves comparing two of its elements, which accepts `$flags` as one of its arguments. - -When these methods are being invoked, type of the very first element of the `Collection` represents that of all other ones. Make sure all elements are of the same type (numeric/string/others), otherwise you're likely to get a segfault. - ### 2.4 Notes * The `Collection::xxxTo()` methods will preserve the original key-value pairs of destination `Collection` when keys collide. +* Some methods of `Collection` involves comparing two of its elements, which accepts `$flags` as one of its arguments. When these methods are being invoked, make sure all elements are of the same type (numeric/string/others), otherwise you're likely to get a segfault. ## 3. Example diff --git a/src/collections_methods.c b/src/collections_methods.c index 3373cb3..5d09912 100644 --- a/src/collections_methods.c +++ b/src/collections_methods.c @@ -73,7 +73,6 @@ #define ERR_BAD_SIZE() PHP_COLLECTIONS_ERROR(E_WARNING, "Size must be non-negative") #define ERR_BAD_INDEX() PHP_COLLECTIONS_ERROR(E_WARNING, "Index must be non-negative") #define ERR_NOT_ARITHMETIC() PHP_COLLECTIONS_ERROR(E_WARNING, "Elements should be int or double") -#define ERR_BAD_FLAG() PHP_COLLECTIONS_ERROR(E_WARNING, "Invalid compare flag") #define ERR_SILENCED() #define ELEMENTS_VALIDATE(elements, err, err_then) \