bug74514.phpt 866 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Bug #74514 5 session functions incorrectly warn when calling in read-only/getter mode.
  3. --EXTENSIONS--
  4. session
  5. --SKIPIF--
  6. <?php
  7. include('skipif.inc');
  8. ?>
  9. --FILE--
  10. <?php
  11. /*
  12. CLI ignores HTTP headers at all, i.e. does not output any HTTP headers,
  13. but it still uses SG(headers_sent).
  14. CLI works as Web server, so SG(headers_sent) cannot be ignored nor changed.
  15. Therefore, once HTTP header is considered as sent, these functions emits
  16. 'headers already sent' errors if they try to set new values.
  17. Older PHPs(<7.2) did not care about this misuse on Web SAPI.
  18. */
  19. var_dump(session_name('foo'));
  20. var_dump(session_name());
  21. var_dump(session_module_name());
  22. var_dump(session_save_path());
  23. var_dump(session_cache_limiter());
  24. var_dump(session_cache_expire());
  25. ?>
  26. --EXPECT--
  27. string(9) "PHPSESSID"
  28. string(3) "foo"
  29. string(5) "files"
  30. string(0) ""
  31. string(7) "nocache"
  32. int(180)