Index Documentation

Comparable
in

Provides an interface for comparison between objects. Allows for order/sorting instances.

Table of Contents

Methods

compare()  : int
Compares the current instance with another and returns an integer that indicates whether the current object comes before or after or the same position and the other object.

Methods

compare()

Compares the current instance with another and returns an integer that indicates whether the current object comes before or after or the same position and the other object.

public compare(mixed $other) : int
Parameters
$other : mixed
Return values
int

A value that indicates the relative order of the objects being compared. Less than zero for before, zero for same position, greater than zero for after.


        
On this page

Search results