1--TEST--
2Test session_set_save_handler() : default object
3--INI--
4session.save_handler=files
5session.name=PHPSESSID
6--EXTENSIONS--
7session
8--SKIPIF--
9<?php include('skipif.inc'); ?>
10--FILE--
11<?php
12
13ob_start();
14
15echo "*** Testing session_set_save_handler() : default object ***\n";
16
17session_set_save_handler(new SessionHandler);
18session_start();
19
20$_SESSION['foo'] = "hello";
21
22var_dump(session_id(), ini_get('session.save_handler'), $_SESSION);
23
24session_write_close();
25session_unset();
26session_start();
27
28var_dump($_SESSION);
29
30session_write_close();
31session_unset();
32?>
33--EXPECTF--
34*** Testing session_set_save_handler() : default object ***
35string(%d) "%s"
36string(4) "user"
37array(1) {
38  ["foo"]=>
39  string(5) "hello"
40}
41array(1) {
42  ["foo"]=>
43  string(5) "hello"
44}
45