session_encode_variation1.phpt 818 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Test session_encode() function : variation
  3. --EXTENSIONS--
  4. session
  5. --SKIPIF--
  6. <?php include('skipif.inc'); ?>
  7. --FILE--
  8. <?php
  9. ob_start();
  10. echo "*** Testing session_encode() : variation ***\n";
  11. var_dump(session_encode());
  12. var_dump(session_start());
  13. var_dump(session_encode());
  14. var_dump(session_write_close());
  15. var_dump(session_encode());
  16. var_dump(session_start());
  17. var_dump(session_encode());
  18. var_dump(session_destroy());
  19. var_dump(session_encode());
  20. echo "Done";
  21. ob_end_flush();
  22. ?>
  23. --EXPECTF--
  24. *** Testing session_encode() : variation ***
  25. Warning: session_encode(): Cannot encode non-existent session in %s on line %d
  26. bool(false)
  27. bool(true)
  28. bool(false)
  29. bool(true)
  30. bool(false)
  31. bool(true)
  32. bool(false)
  33. bool(true)
  34. Warning: session_encode(): Cannot encode non-existent session in %s on line %d
  35. bool(false)
  36. Done