PHP code example of paradisesessions / session

1. Go to this page and download the library: Download paradisesessions/session library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

paradisesessions / session example snippets


$options = [];
$session = new ParadiseSessions\Session($options);

// set session
$session->set('email', '[email protected]');

// verify exists
if ($session->has('email')) {
    echo $session->email;
}

// access property
echo $session->email;

// show all
print_r($session->all());

// unset session
$session->unset('email');

// destroy session
$session->destroy();