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
9$initHandler = ini_get('session.save_handler');
10session_set_save_handler(
11    function ($savePath, $sessionName) {
12        return true;
13    },
14    function () {
15        return true;
16    },
17    function ($id) {
18        return '';
19    },
20    function ($id, $data) {
21        return true;
22    },
23    function ($id) {
24        return true;
25    },
26    function ($maxlifetime) {
27        return true;
28    }
29);
30$setHandler = ini_get('session.save_handler');
31var_dump($initHandler, $setHandler);
32?>
33--EXPECTF--
34Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in %s on line %d
35
36Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent (sent from %s on line %d) in %s on line %d
37string(8) "whatever"
38string(8) "whatever"
39