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