PHPackages                             which1ispink/session - 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. which1ispink/session

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

which1ispink/session
====================

A simple PHP native session wrapper

1.1.0(8y ago)250MITPHPPHP &gt;=5.5

Since May 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/which1ispink/session)[ Packagist](https://packagist.org/packages/which1ispink/session)[ RSS](/packages/which1ispink-session/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (3)Used By (0)

which1ispink/session
====================

[](#which1ispinksession)

This is a simple PHP native session wrapper

Installation
------------

[](#installation)

If you're using composer it's as easy as requiring the package:

```
$ composer require which1ispink/session
```

Otherwise you'd have to include the src/Session.php file the old-fashioned way.

Usage
-----

[](#usage)

```
use Which1ispink\Session\Session;

// this needs to be called in your bootstrapping code like an index.php file
Session::init();

// setting a session variable
Session::set('username', 'some_username');

// getting said variable later
Session::get('username');

// get all session contents
Session::all();

// or get all session contents including flash messages
Session::all(true);

// check if previous session variable exists (returns a boolean)
Session::has('username');

// or remove previous session variable
Session::remove('username');

// or go a step further and clear all session data
Session::clear();
```

Flash messages
--------------

[](#flash-messages)

You can use flash messages that only exist for the duration of next request

```
// add a flash message
Session::addFlashMessage('status', 'Your order has been submitted successfully!');

// get previous flash message on the next request
Session::getFlashMessage('status');

// get all flash messages currently in the session
Session::getAllFlashMessages();
```

License
-------

[](#license)

This library is licensed under the MIT license. See [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~7 days

Total

2

Last Release

3270d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.1.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd49aa47188390bccc5adc5882e749870bdd7ba43677ef37ecb235a87341516c?d=identicon)[which1ispink](/maintainers/which1ispink)

---

Tags

phpsession-managementphpsession

### Embed Badge

![Health badge](/badges/which1ispink-session/health.svg)

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

###  Alternatives

[rcastera/session

Session Class

222.2k](/packages/rcastera-session)

PHPackages © 2026

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