session_encode_variation7.phpt 685 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Test session_encode() function : variation
  3. --SKIPIF--
  4. <?php include('skipif.inc'); ?>
  5. --INI--
  6. session.serialize_handler=php_binary
  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_start());
  17. $_SESSION["foo"] = 1234567890;
  18. $encoded = session_encode();
  19. var_dump(base64_encode($encoded));
  20. var_dump(session_destroy());
  21. echo "Done";
  22. ob_end_flush();
  23. ?>
  24. --EXPECTF--
  25. *** Testing session_encode() : variation ***
  26. bool(true)
  27. string(24) "A2Zvb2k6MTIzNDU2Nzg5MDs="
  28. bool(true)
  29. Done