1--TEST-- 2Test session_decode() function : variation 3--EXTENSIONS-- 4session 5--SKIPIF-- 6<?php include('skipif.inc'); ?> 7--INI-- 8session.serialize_handler=blah 9--FILE-- 10<?php 11 12ob_start(); 13 14echo "*** Testing session_decode() : variation ***\n"; 15 16var_dump(session_start()); 17var_dump($_SESSION); 18$_SESSION["foo"] = 1234567890; 19$_SESSION["bar"] = "Blah!"; 20$_SESSION["guff"] = 123.456; 21var_dump($_SESSION); 22$encoded = "foo|i:1234567890;"; 23var_dump(session_decode($encoded)); 24var_dump($_SESSION); 25var_dump(session_destroy()); 26 27echo "Done"; 28ob_end_flush(); 29?> 30--EXPECTF-- 31*** Testing session_decode() : variation *** 32 33Warning: session_start(): Cannot find session serialization handler "blah" - session startup failed in %s on line %d 34bool(false) 35 36Warning: Undefined global variable $_SESSION in %s on line %d 37NULL 38array(3) { 39 ["foo"]=> 40 int(1234567890) 41 ["bar"]=> 42 string(5) "Blah!" 43 ["guff"]=> 44 float(123.456) 45} 46 47Warning: session_decode(): Session data cannot be decoded when there is no active session in %s on line %d 48bool(false) 49array(3) { 50 ["foo"]=> 51 int(1234567890) 52 ["bar"]=> 53 string(5) "Blah!" 54 ["guff"]=> 55 float(123.456) 56} 57 58Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d 59bool(false) 60Done 61