bug61728.phpt 691 B

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