delta.php
Table of Contents
Functions
-
delta()
: array{0: array
, 1: array , 2: array } - Tells what left, what showed up, and what stayed, between two lists of identifiers.
Functions
delta()
Tells what left, what showed up, and what stayed, between two lists of identifiers.
delta(array<int, string> $before, array<int, string> $now) : array{0: array, 1: array, 2: array}
Meant to diff two runs of the same listing — e.g. the ids returned by a previous fetch versus the current one — and answer three questions at once : what closed, what appeared, and what stayed.
Parameters
- $before : array<int, string>
-
The identifiers of a previous run.
- $now : array<int, string>
-
The identifiers of this run.
Tags
Return values
array{0: arrayA 3-tuple [ $removed , $added , $kept ], each re-indexed from 0.