session_encode() just return the session dataset in a formatted form
session_start();
$_SESSION['login_ok'] = true;
$_SESSION['nome'] = 'sica';
$_SESSION['inteiro'] = 34;
echo session_encode();
this code will print
login_ok|b:1;nome|s:4:"sica";inteiro|i:34;