Php-session-serializer

This page is a translated version of the page Php-session-serializer and the translation is 100% complete.

php-session-serializer is a PHP library that provides methods that work like PHP's session_encode and session_decode functions but don't mess with the $_SESSION superglobal.

Sú-iōng

use Wikimedia\PhpSessionSerializer;

// (suán-ti̍k-sìng) Kā li̍t-tsì huat-sàng kàu PSR-3 kì-lo̍k-khì
PhpSessionSerializer::setLogger( $logger );

// (suán-ti̍k-sìng) Khak-pó session.serialize_handler siat-tī uî ē-tàng iōng ê kè-ta̍t
PhpSessionSerializer::setSerializeHandler();

// Piàn-bé huē-gī sòo-kì
$string = PhpSessionSerializer::encode( $array );

// Khai-bé huē-gī sòo-kì
$array = PhpSessionSerializer::decode( $string );

Guā-pōo liân-kiat