PHPackages                             pytocryto/flash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pytocryto/flash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pytocryto/flash
===============

Flash messages with PHP sessions

1.0.1(8y ago)0231MITPHPPHP &gt;=5.6.0

Since Apr 26Pushed 8y agoCompare

[ Source](https://github.com/PytoCryto/PytoFlashMessage)[ Packagist](https://packagist.org/packages/pytocryto/flash)[ RSS](/packages/pytocryto-flash/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (3)Used By (1)

Flash messages with PHP sessions
================================

[](#flash-messages-with-php-sessions)

This library is by default Bootstrap compatible but you can customize it how you want.

Installation (require composer)
-------------------------------

[](#installation-require-composer)

### With Composer

[](#with-composer)

```
composer require pytocryto/flash
```

Usage example
-------------

[](#usage-example)

```
// require the composer autoload
require __DIR__ . '/vendor/autoload.php';

if (session_status() === PHP_SESSION_NONE) {
    // start the session
    session_start();
}

// create a new FlashMessage instance
$flash = PytoCryto\Flash\FlashMessage::getInstance();

/**
 * Configuration (optional)
*/
$flash->config([
    'sticky'     => false, // sticky: Render all messages without a close button
    'fadeOut'    => true, // fadeOut on close
    'withTitles' => true, // render messages with the message type as a title if none specified
]);

/**
 * Flash messages
*/
$flash->info('Hello! This is a sticky info message with a title.', $dismissable = false, 'Title here'); // sticky message
$flash->error('Hello! This is a error message.');
$flash->success('Hello! This is a success message.');
$flash->warning('Hello! This is a warning message. Number: {counter}');
$flash->warning('Hello! This is a warning message. Number: {counter}');

// you can check if certain types of messages exist, this is useful for form validation
if ($flash->hasErrors()) {
    // error messages has been set
}
if ($flash->hasWarnings()) {
    // warning messages has been set
}

// display all messages
$flash->display();

// or just display the errors and warnings
$flash->display(['error', 'warning']);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2941d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63810c77461e205100969a471eb729cbabf2ee5af4e027e9199eb5f349d431a0?d=identicon)[PytoCryto](/maintainers/PytoCryto)

---

Top Contributors

[![PytoCryto](https://avatars.githubusercontent.com/u/37124742?v=4)](https://github.com/PytoCryto "PytoCryto (3 commits)")

### Embed Badge

![Health badge](/badges/pytocryto-flash/health.svg)

```
[![Health](https://phpackages.com/badges/pytocryto-flash/health.svg)](https://phpackages.com/packages/pytocryto-flash)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
