PayloadDifference
API reference › Debug Core › Comparison › PayloadDifference
Counts structural payload differences without retaining diagnostic values or their fingerprints.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$added readonly constructor | int | Leaves present only in the target payload. | PayloadDifference |
$changed readonly constructor | int | Leaves present in both payloads under a different value. | PayloadDifference |
$removed readonly constructor | int | Leaves present only in the baseline payload. | PayloadDifference |
$unchanged readonly constructor | int | Leaves present in both payloads under the same value. | PayloadDifference |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
between() static | Compares typed leaves at escaped paths, treating an empty array as a leaf and null as an absent payload. | PayloadDifference |
Method details
Section titled “Method details”between()
Section titled “between() ”public static function between(array<string, mixed>|null $baseline, array<string, mixed>|null $target): selfCompares typed leaves at escaped paths, treating an empty array as a leaf and null as an absent payload.
Parameters
| Parameter | Type | Description |
|---|---|---|
$baseline | array<string, | Baseline payload, or null when not captured. |
$target | array<string, | Target payload, or null when not captured. |
Returns
self: Structural difference counts for the two payloads.