1--TEST--
2Test session_encode() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10echo "*** Testing session_encode() : variation ***\n";
11
12var_dump(session_start());
13$_SESSION[] = 1234567890;
14var_dump(session_encode());
15var_dump(session_destroy());
16var_dump(session_start());
17$_SESSION[1234567890] = "Hello World!";
18var_dump(session_encode());
19var_dump(session_destroy());
20var_dump(session_start());
21$_SESSION[-1234567890] = 1234567890;
22var_dump(session_encode());
23var_dump(session_destroy());
24
25echo "Done";
26ob_end_flush();
27?>
28--EXPECTF--
29*** Testing session_encode() : variation ***
30bool(true)
31
32Warning: session_encode(): Skipping numeric key 0 in %s on line %d
33bool(false)
34bool(true)
35bool(true)
36
37Warning: session_encode(): Skipping numeric key 1234567890 in %s on line %d
38bool(false)
39bool(true)
40bool(true)
41
42Warning: session_encode(): Skipping numeric key -1234567890 in %s on line %d
43bool(false)
44bool(true)
45Done
46