The Comparable
interface defines the getComparisonTo
method,
which determines the sort order of instances of the implementing type.
The Equalable
interface defines the isEqualTo
& isNotEqualTo
methods,
which determines the equality of instances of the implementing type.
PHP doesn't have built-in interfaces for object comparison. Inspired by:
- Java Comparable interface
- .NET IComparable interface
- .NET IEquatable interface
- Ruby Comparable module
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Anton Komarev |
---|
PHP I: Comparison contributors list
PHP I: Comparison
package is open-sourced software licensed under the MIT license by Anton Komarev.