Shipeasy
SDKsReferencePHP

Killswitches

A killswitch is a global panic boolean shipped in the same blob as gates and configs. Unlike a flag it is not user-scoped — it returns the current switch…

Generated from the SDK's own /docs/ — also served raw at https://shipeasy-ai.github.io/sdk-php/pages/killswitches.md.

A killswitch is a global panic boolean shipped in the same blob as gates and configs. Unlike a flag it is not user-scoped — it returns the current switch state (optionally a named per-key override).

Read a killswitch

use Shipeasy\Client;

$client = new Client($currentUser);   // construct once per callsite

$panic = $client->getKillswitch('payments_panic');     // bool
if ($panic) {
    // disable the payments path
}

Assumes Shipeasy\configure() ran at startup — see Installation.

Named per-key override switch

A killswitch can carry named per-key override switches (the dashboard "switches" feature). Pass the switch key as the second argument — the $switchKey — to read that named override:

$client = new Client($currentUser);                      // construct once per callsite
$region = 'eu_region';
$panic  = $client->getKillswitch('payments_panic', $region);   // $switchKey = 'eu_region'

When the named $switchKey has no configured override, the call falls back to the killswitch's top-level killed value.

Default behaviour

Returns a boolean; defaults to false when the killswitch is not present in the fetched blob.

Was this page helpful?
Updated July 25, 2026

On this page