xref: /PHP-5.3/ext/session/tests/001.phpt (revision 8deefa87)
1--TEST--
2session object serialization
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.use_cookies=0
7session.cache_limiter=
8register_globals=1
9session.serialize_handler=php
10session.save_handler=files
11--FILE--
12<?php
13error_reporting(E_ALL);
14
15class foo {
16	public $bar = "ok";
17
18	function method() { $this->yes = "done"; }
19}
20
21$baz = new foo;
22$baz->method();
23
24$arr[3] = new foo;
25$arr[3]->method();
26
27session_register("baz");
28session_register("arr");
29
30print session_encode()."\n";
31
32session_destroy();
33--EXPECTF--
34Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
35
36Deprecated: Function session_register() is deprecated in %s on line %d
37
38Deprecated: Function session_register() is deprecated in %s on line %d
39baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}}
40
41