blob: 200d90740398051253ca54d2ff2236b821d091cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--TEST--
Session Object Deserialization
--FILE--
<?
class foo {
var $bar = "ok";
function method() { $this->yes++; }
}
session_id("test");
session_start();
session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}');
var_dump($baz);
var_dump($arr);
session_destroy();
--EXPECT--
object(foo)(2) {
["bar"]=>
string(2) "ok"
["yes"]=>
int(1)
}
array(1) {
[3]=>
object(foo)(2) {
["bar"]=>
string(2) "ok"
["yes"]=>
int(1)
}
}
|