PHP code example of bistro / session
1. Go to this page and download the library: Download bistro/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/ */
bistro / session example snippets
php
$session = new \Bistro\Session\Native;
$timeout = $session->get('timeout');
if ($timeout === null)
{
$session->set('timeout', time() + 43200);
}
php
$data = array(
'test' => "Session data",
'goes' => "Here"
)
$session = new \Bistro\Session\MockArray($data);
$session->has('test'); // true
$missing = $session->get('missing'); // null