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