xref: /PHP-8.1/ext/session/tests/bug61728.phpt (revision b5a14e6c)
1--TEST--
2Bug #61728 (PHP crash when calling ob_start in request_shutdown phase)
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9function output_html($ext) {
10    return strlen($ext);
11}
12
13function open ($save_path, $session_name) {
14    return true;
15}
16
17function close() {
18    return true;
19}
20
21function read ($id) {
22    return '';
23}
24
25function write ($id, $sess_data) {
26    ob_start("output_html");
27    echo "laruence";
28    ob_end_flush();
29    return true;
30}
31
32function destroy ($id) {
33    return true;
34}
35
36function gc ($maxlifetime) {
37    return true;
38}
39
40session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
41session_start();
42?>
43--EXPECT--
448
45