Skip to content

removeSession

Corey Avis edited this page Sep 23, 2026 · 2 revisions

removeSession

Removes a single item from the active session.

Usage

removeSession(string $key): bool

Parameters

key (string) : The key of the item to remove.

Return Value

(bool) : Returns true if successfully removed, or false if the key was not set.

Examples

$cphp->removeSession('temp_data') = true|false

Debug Errors

  • Logs a notice if the session variable does not exist.

Related Methods

clearSession | endSession | getSession | regenSession | setSession | startSession


Home | CoreyPHP | Session Management

Clone this wiki locally