1--TEST-- 2Bug #61728 (PHP crash when calling ob_start in request_shutdown phase) 3--EXTENSIONS-- 4session 5--FILE-- 6<?php 7function output_html($ext) { 8 return strlen($ext); 9} 10 11class MySessionHandler implements SessionHandlerInterface { 12 function open ($save_path, $session_name): bool { 13 return true; 14 } 15 16 function close(): bool { 17 return true; 18 } 19 20 function read ($id): string { 21 return ''; 22 } 23 24 function write ($id, $sess_data): bool { 25 ob_start("output_html"); 26 echo "laruence"; 27 ob_end_flush(); 28 return true; 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(); 42?> 43--EXPECT-- 448 45