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