session_encode_variation2.phpt 658 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Test session_encode() function : variation
  3. --SKIPIF--
  4. <?php include('skipif.inc'); ?>
  5. --INI--
  6. session.auto_start=1
  7. --FILE--
  8. <?php
  9. ob_start();
  10. /*
  11. * Prototype : string session_encode(void)
  12. * Description : Encodes the current session data as a string
  13. * Source code : ext/session/session.c
  14. */
  15. echo "*** Testing session_encode() : variation ***\n";
  16. var_dump(session_encode());
  17. var_dump(session_destroy());
  18. var_dump(session_encode());
  19. echo "Done";
  20. ob_end_flush();
  21. ?>
  22. --EXPECTF--
  23. *** Testing session_encode() : variation ***
  24. bool(false)
  25. bool(true)
  26. Warning: session_encode(): Cannot encode non-existent session in %s on line %d
  27. bool(false)
  28. Done