# Session Management

> Section in “New and Extended Functionality” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/session-management/>

## In this section

- [session_start()](https://php7explained.com/new-and-extended-functionality/session-management/session_start/index.html.md): Starting with PHP 7, session_start() accepts an array of options that override session ini settings, including read_and_close to avoid needless locking.
- [Session ID without Hashing](https://php7explained.com/new-and-extended-functionality/session-management/session-id-without-hashing/index.html.md): PHP 7.1 stops hashing generated session IDs, drops settings such as session.hash_function, and adds session.sid_length and session.sid_bits_per_character.
- [Session Garbage Collection](https://php7explained.com/new-and-extended-functionality/session-management/session-garbage-collection/index.html.md): Starting with PHP 7.1, session_gc() runs session garbage collection on demand, for example from a cron job, with session.gc_probability set to 0.

---

Previous: [Flags for preg_replace_callback() and preg_replace_callback_array()](https://php7explained.com/new-and-extended-functionality/regular-expressions/flags-for-preg_replace_callback-and-preg_replace_callback_array/index.html.md) | Next: [session_start()](https://php7explained.com/new-and-extended-functionality/session-management/session_start/index.html.md)
