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