This idea is inspiring from laravel codebase, web.php, it’s a useful and simple.

// As you can see, it can be used to define the api or code version simplify.
if (! defined('DEFAULT_VERSION')) {
    define('DEFAULT_VERSION', '9.x');
}

if (! defined('SHOW_VAPOR')) {
    define('SHOW_VAPOR', random_int(1, 2) === 1);
}

// Also you can do something when definition was equaled.
if (! defined('SHOW_PROMO')) {
    $int = random_int(1, 3);

    if ($int === 1) {
        define('SHOW_PROMO', 'FORGE');
    } elseif ($int === 2) {
        define('SHOW_PROMO', 'VAPOR');
    } elseif ($int === 3) {
        define('SHOW_PROMO', 'PARTNERS');
    }
}