bug61728.phpt 649 B

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