Download the PHP package clsmedia/feature-flag without Composer
On this page you can find all versions of the php package clsmedia/feature-flag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download clsmedia/feature-flag
More information about clsmedia/feature-flag
Files in clsmedia/feature-flag
Download clsmedia/feature-flag
More information about clsmedia/feature-flag
Files in clsmedia/feature-flag
Vendor clsmedia
Package feature-flag
Short Description Set feature flag via .env or cookies
License MIT
Package feature-flag
Short Description Set feature flag via .env or cookies
License MIT
Please rate this library. Is it a good library?
Informations about the package feature-flag
clsmedia\feature-flag
A simple PHP package to handle feature flags via .env or cookies.
Installation
Quick Start
Defining Flags
Via .env
Via Cookie
Flags can be defined in both .env and cookie simultaneously. Both sources are checked.
Basic Usage
Default Value for Missing Flags
When a flag doesn't exist, you can provide a default value:
Time-Based Flags
Enable flags only within a specific time window (UTC):
Format: flagName|startDateTime;endDateTime
Examples:
feature1|2026-01-01T00:00:00;2026-12-31T23:59:59— active only in 2026feature2— no time restriction, always active
How it works
- If current time is outside the window → flag returns
false - If current time is inside the window → checks sources normally
- Malformed datetime suffix → flag treated as regular (no time restriction)
Flag Definition Format
flag1— regular flagflag2— time-based flag (active only in window)flag3— regular flag
Examples
See index.php for complete working examples including:
- Basic flag checking
- Cookie-based flags
- Time-based flags
- Default values
- Using
misses()for inverted logic
All versions of feature-flag with dependencies
PHP Build Version
Package Version
No informations.
The package clsmedia/feature-flag contains the following files
Loading the files please wait ...