1--TEST--
2Test session_encode() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.serialize_handler=blah
7--FILE--
8<?php
9
10ob_start();
11
12/*
13 * Prototype : string session_encode(void)
14 * Description : Encodes the current session data as a string
15 * Source code : ext/session/session.c
16 */
17
18echo "*** Testing session_encode() : variation ***\n";
19
20var_dump(session_start());
21$_SESSION["foo"] = 1234567890;
22$encoded = session_encode();
23var_dump(base64_encode($encoded));
24var_dump(session_destroy());
25
26echo "Done";
27ob_end_flush();
28?>
29--EXPECTF--
30*** Testing session_encode() : variation ***
31
32Warning: session_start(): Cannot find serialization handler 'blah' - session startup failed in %s on line %d
33bool(false)
34
35Warning: session_encode(): Cannot encode non-existent session in %s on line %d
36string(0) ""
37
38Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
39bool(false)
40Done
41