Skip to content

Kirby 5.0.4

$session->increment()

Increments one or multiple session values by a specified amount

$session->increment(string|array $key, int $by = 1, int|null $max = null): void

Parameters

Name Type Default Description
$keyrequired stringorarray no default value The key to increment or an array with multiple keys
$by int 1 Increment by which amount?
$max intornull null Maximum amount (value is not incremented further)

Parent class

Kirby\Session\SessionData