1--TEST--
2Bug #80889 (Cannot set save handler when save_handler is invalid)
3--EXTENSIONS--
4session
5--INI--
6session.save_handler=whatever
7--FILE--
8<?php
9class DummyHandler implements SessionHandlerInterface {
10    public function open($savePath, $sessionName): bool {
11        return true;
12    }
13    public function close(): bool {
14        return true;
15    }
16    public function read($id): string|false {
17        return '';
18    }
19    public function write($id, $data): bool {
20        return true;
21    }
22    public function destroy($id): bool {
23        return true;
24    }
25    public function gc($maxlifetime): int|false {
26        return true;
27    }
28}
29
30$initHandler = ini_get('session.save_handler');
31session_set_save_handler(new DummyHandler());
32$setHandler = ini_get('session.save_handler');
33var_dump($initHandler, $setHandler);
34?>
35--EXPECT--
36string(8) "whatever"
37string(4) "user"
38