madeorsk / session
Easy session handling in PHP.
1.0
2020-05-26 10:04 UTC
Requires
- php: >= 7.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2026-02-26 23:06:48 UTC
README
Easy Session handling in PHP.
Quick start
use Session\Session; // Initialize session. $session = new Session(); $session->write("name", "this is a text value"); // Save "this is a text value" in the session. // ... echo $session->read("name"); // Will echo "this is a text value". echo $session->read("undefined_name", "my default value"); // Will echo "my default value". // ... $value = $session->delete("name"); // Delete the value of the session variable "name" in the session and return it.
Full documentation
Full API documentation is currently a work in progress. You can still see the full documentation of the different methods in the source code.