Php-session-serializer
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 );