session_decode

int session_decode(string session_data) 

Decodes session data.

Returns:

TRUE on success; FALSE on error

Description:

Decodes raw session data and creates variables with the same names as those stored in the session data.

Version:

Existing since version 4.0

Example:

Decode and display session data
$file = file("/tmp/sess_9b7947ce5a02147955ad6671bfbe79ed"); 
// contains value for $counter 
session_decode($file[0]); 
echo $counter; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.