1--TEST-- 2Test session_decode() function : variation 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--FILE-- 6<?php 7 8ob_start(); 9 10/* 11 * Prototype : string session_decode(void) 12 * Description : Decodes session data from a string 13 * Source code : ext/session/session.c 14 */ 15 16echo "*** Testing session_decode() : variation ***\n"; 17 18var_dump(session_start()); 19var_dump($_SESSION); 20$_SESSION["foo"] = 1234567890; 21$_SESSION["bar"] = "Blah!"; 22$_SESSION["guff"] = 123.456; 23var_dump($_SESSION); 24$encoded = "A2Zvb2k6MTIzNDU2Nzg5MDs="; 25var_dump(session_decode(base64_decode($encoded))); 26var_dump($_SESSION); 27var_dump(session_destroy()); 28 29echo "Done"; 30ob_end_flush(); 31?> 32--EXPECT-- 33*** Testing session_decode() : variation *** 34bool(true) 35array(0) { 36} 37array(3) { 38 ["foo"]=> 39 int(1234567890) 40 ["bar"]=> 41 string(5) "Blah!" 42 ["guff"]=> 43 float(123.456) 44} 45bool(true) 46array(3) { 47 ["foo"]=> 48 int(1234567890) 49 ["bar"]=> 50 string(5) "Blah!" 51 ["guff"]=> 52 float(123.456) 53} 54bool(true) 55Done 56