Annotation of embedaddon/php/ext/session/tests/session_start_variation5.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test session_start() function : variation
! 3: --SKIPIF--
! 4: <?php include('skipif.inc'); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: ob_start();
! 9:
! 10: /*
! 11: * Prototype : bool session_start(void)
! 12: * Description : Initialize session data
! 13: * Source code : ext/session/session.c
! 14: */
! 15:
! 16: echo "*** Testing session_start() : variation ***\n";
! 17:
! 18: session_start();
! 19:
! 20: $_SESSION['colour'] = 'green';
! 21: $_SESSION['animal'] = 'cat';
! 22: $_SESSION['person'] = 'julia';
! 23: $_SESSION['age'] = 6;
! 24:
! 25: var_dump($_SESSION);
! 26: var_dump(session_write_close());
! 27: var_dump($_SESSION);
! 28:
! 29: session_start();
! 30: session_destroy();
! 31: echo "Done";
! 32: ob_end_flush();
! 33: ?>
! 34: --EXPECTF--
! 35: *** Testing session_start() : variation ***
! 36: array(4) {
! 37: ["colour"]=>
! 38: string(5) "green"
! 39: ["animal"]=>
! 40: string(3) "cat"
! 41: ["person"]=>
! 42: string(5) "julia"
! 43: ["age"]=>
! 44: int(6)
! 45: }
! 46: NULL
! 47: array(4) {
! 48: ["colour"]=>
! 49: string(5) "green"
! 50: ["animal"]=>
! 51: string(3) "cat"
! 52: ["person"]=>
! 53: string(5) "julia"
! 54: ["age"]=>
! 55: int(6)
! 56: }
! 57: Done
! 58:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>