summaryrefslogtreecommitdiff
path: root/ext/session/tests/bug80889a.phpt
blob: ff0c0253823af93ca9075362940e2fceca9e0bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--TEST--
Bug #80889 (Cannot set save handler when save_handler is invalid)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.save_handler=whatever
--FILE--
<?php
$initHandler = ini_get('session.save_handler');
session_set_save_handler(
    function ($savePath, $sessionName) {
        return true;
    },
    function () {
        return true;
    },
    function ($id) {
        return '';
    },
    function ($id, $data) {
        return true;
    },
    function ($id) {
        return true;
    },
    function ($maxlifetime) {
        return true;
    }
);
$setHandler = ini_get('session.save_handler');
var_dump($initHandler, $setHandler);
?>
--EXPECT--
string(8) "whatever"
string(4) "user"