Skip to content

Kirby 4.4.1

$session->decrement()

Decrements one or multiple session values by a specified amount

$session->decrement(array|string $key, int $by = 1, ?int $min = null): void

Parameters

Name Type Default Description
$key * array|string The key to decrement or an array with multiple keys
$by int 1 Decrement by which amount?
$min int|null null Minimum amount (value is not decremented further)

Parent class

Kirby\Session\SessionData