php-cooper

Values
in package

FinalYes

Structural equality over loaded values -- what `-key = [...]` (CASC.md ยง8.4) removes by, and what the value classes' own `equals()` methods build on.

Strict where PHP's == is loose: 1 and 1.0 differ, as do "1" and 1 (the Elixir original's exact-match in). Arrays compare by keys and values in order; objects of the same class compare by their own equals() when they have one.

Table of Contents

Methods

equals()  : bool
Whether `$a` and `$b` are structurally equal.
__construct()  : mixed

Methods

equals()

Whether `$a` and `$b` are structurally equal.

public static equals(mixed $a, mixed $b) : bool
Parameters
$a : mixed

the first value

$b : mixed

the second value

Return values
bool —

true when both hold the same value

__construct()

private __construct() : mixed
On this page

Search results