php-src/ext/session/tests/001.phpt

34 lines
654 B
Plaintext
Raw Normal View History

--TEST--
2002-10-03 16:14:55 +00:00
session object serialization
--SKIPIF--
2002-04-19 07:55:24 +00:00
<?php include('skipif.inc'); ?>
--INI--
2002-10-03 15:11:01 +00:00
session.use_cookies=0
session.cache_limiter=
session.serialize_handler=php
session.save_handler=files
--FILE--
<?php
2002-10-03 16:14:55 +00:00
error_reporting(E_ALL);
class foo {
public $bar = "ok";
function method() { $this->yes = "done"; }
}
$baz = new foo;
$baz->method();
$arr[3] = new foo;
$arr[3]->method();
session_start();
$_SESSION["baz"] = $baz;
$_SESSION["arr"] = $arr;
2006-12-27 19:22:29 +00:00
var_dump(session_encode());
session_destroy();
2006-12-27 19:22:29 +00:00
?>
--EXPECT--
2007-01-05 02:07:59 +00:00
unicode(126) "baz|O:3:"foo":2:{U:3:"bar";U:2:"ok";U:3:"yes";U:4:"done";}arr|a:1:{i:3;O:3:"foo":2:{U:3:"bar";U:2:"ok";U:3:"yes";U:4:"done";}}"