1--TEST--
2Test session_encode() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : string session_encode(void)
12 * Description : Encodes the current session data as a string
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_encode() : variation ***\n";
17
18var_dump(session_start());
19
20$array = array(1,2,3);
21$array["foo"] = &$array;
22$array["blah"] = &$array;
23$_SESSION["data"] = &$array;
24var_dump(session_encode());
25var_dump(session_destroy());
26
27echo "Done";
28ob_end_flush();
29?>
30--EXPECT--
31*** Testing session_encode() : variation ***
32bool(true)
33string(64) "data|a:5:{i:0;i:1;i:1;i:2;i:2;i:3;s:3:"foo";R:1;s:4:"blah";R:1;}"
34bool(true)
35Done
36