Annotation of embedaddon/php/ext/session/tests/session_encode_variation4.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test session_encode() function : variation
! 3: --SKIPIF--
! 4: <?php include('skipif.inc'); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: ob_start();
! 9:
! 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:
! 16: echo "*** Testing session_encode() : variation ***\n";
! 17:
! 18: var_dump(session_start());
! 19:
! 20: $array = array(1,2,3);
! 21: $_SESSION["foo"] = &$array;
! 22: $_SESSION["guff"] = &$array;
! 23: $_SESSION["blah"] = &$array;
! 24: var_dump(session_encode());
! 25: var_dump(session_destroy());
! 26:
! 27: echo "Done";
! 28: ob_end_flush();
! 29: ?>
! 30: --EXPECTF--
! 31: *** Testing session_encode() : variation ***
! 32: bool(true)
! 33: string(52) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"
! 34: bool(true)
! 35: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>