<?php
session_start();
if(isset($_SESSION['views']))
$_SESSION['views'] = $_SESSION['views']+ 1;
else
$_SESSION['views'] = 1;
echo "views = " . $_SESSION['views'];
?>
<?php
$item = $_SESSION['item'];
<?php
$item = $session->get('item');
<?php
$item = $session->item;
<?php
$name = $_SESSION['name'];
// or:
$name = $session->name;
// or:
$name = $session->get('name');