session_cache_limiter_variation3.phpt 962 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. Test session_cache_limiter() function : variation
  3. --SKIPIF--
  4. <?php include('skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. ob_start();
  8. /*
  9. * Prototype : string session_cache_limiter([string $cache_limiter])
  10. * Description : Get and/or set the current cache limiter
  11. * Source code : ext/session/session.c
  12. */
  13. echo "*** Testing session_cache_limiter() : variation ***\n";
  14. var_dump(ini_get("session.cache_limiter"));
  15. var_dump(session_start());
  16. var_dump(ini_get("session.cache_limiter"));
  17. var_dump(session_cache_limiter("public"));
  18. var_dump(ini_get("session.cache_limiter"));
  19. var_dump(session_destroy());
  20. var_dump(ini_get("session.cache_limiter"));
  21. echo "Done";
  22. ob_end_flush();
  23. ?>
  24. --EXPECTF--
  25. *** Testing session_cache_limiter() : variation ***
  26. string(7) "nocache"
  27. bool(true)
  28. string(7) "nocache"
  29. Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 16
  30. bool(false)
  31. string(7) "nocache"
  32. bool(true)
  33. string(7) "nocache"
  34. Done