session_gc_basic.phpt 640 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Test session_gc() function : basic functionality
  3. --EXTENSIONS--
  4. session
  5. --SKIPIF--
  6. <?php include('skipif.inc'); ?>
  7. --FILE--
  8. <?php
  9. ob_start();
  10. echo "*** Testing session_gc() : basic functionality ***\n";
  11. var_dump(session_gc());
  12. var_dump(session_start());
  13. var_dump(session_gc(), session_gc() >= -1);
  14. var_dump(session_destroy());
  15. var_dump(session_id());
  16. echo "Done";
  17. ob_end_flush();
  18. ?>
  19. --EXPECTF--
  20. *** Testing session_gc() : basic functionality ***
  21. Warning: session_gc(): Session cannot be garbage collected when there is no active session in %s on line %d
  22. bool(false)
  23. bool(true)
  24. int(%d)
  25. bool(true)
  26. bool(true)
  27. string(0) ""
  28. Done