remove unused code. update readme.

This commit is contained in:
CismonX 2018-08-21 10:29:43 +08:00
parent f32fa48291
commit ac28d9eaa6
2 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -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) \