php session_decode() function
Translation results:
English[ˌdi:ˈkəʊd] US[ˌdi:ˈkoʊd]
vt. Translate (code), decipher (code); analyze and decode electronic signals
Third person singular: decodes Present participle: decoding Past tense: decoded Past participle: decoded
php session_decode() functionsyntax
Function:Decode session data
Syntax:bool session_decode (string $data)
Parameters:
Parameters | Description |
data | Encoded data. |
Description: session_decode() decodes the serialized session data in the $data parameter, and uses the decoded data to fill $_SESSION Super global variables.
php session_decode() functionexample
<?php session_start(); $_SESSION['login_ok'] = true; $_SESSION['nome'] = 'sica'; $_SESSION['inteiro'] = 34; echo session_encode(); ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
login_ok|b:1;nome|s:4:"sica";inteiro|i:34;
<?php session_start(); $_SESSION['name'] = "php中文网"; $_SESSION['id'] = 1; $_SESSION['pkey'] = 1; echo session_encode(); ?>
Run Instance»
Click the "Run Instance" button to view the online instance
Output:
name|s:12:"php中文网";id|i:1;pkey|i:1;