1--TEST--
2Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
3--INI--
4session.save_path=
5session.name=PHPSESSID
6session.save_handler=files
7--EXTENSIONS--
8session
9--FILE--
10<?php
11
12ob_start();
13
14class MySessionHandler implements SessionHandlerInterface {
15    function open($save_path, $session_name): bool {
16        return true;
17    }
18
19    function close(): bool {
20        die("close: goodbye cruel world\n");
21    }
22
23    function read($id): string|false {
24        return '';
25    }
26
27    function write($id, $session_data): bool {
28        die("write: goodbye cruel world\n");
29    }
30
31    function destroy($id): bool {
32        return true;
33    }
34
35    function gc($maxlifetime): int {
36        return 1;
37    }
38}
39
40session_set_save_handler(new MySessionHandler());
41session_start();
42session_write_close();
43echo "um, hi\n";
44
45?>
46--EXPECT--
47write: goodbye cruel world
48