1--TEST-- 2Test session_reset() function : basic functionality 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--INI-- 6session.save_path= 7session.name=PHPSESSID 8--FILE-- 9<?php 10 11ob_start(); 12 13/* 14 * Prototype : void session_reset(void) 15 * Description : Should abort session. Session data should not be written. 16 * Source code : ext/session/session.c 17 */ 18 19echo "*** Testing session_abort() : basic functionality ***\n"; 20 21session_start(); 22$session_id = session_id(); 23$_SESSION['foo'] = 123; 24session_commit(); 25 26session_id($session_id); 27session_start(); 28$_SESSION['bar'] = 456; 29var_dump($_SESSION); 30session_reset(); 31 32var_dump($_SESSION); // Should only have 'foo' 33 34echo "Done".PHP_EOL; 35 36?> 37--EXPECTF-- 38*** Testing session_abort() : basic functionality *** 39array(2) { 40 ["foo"]=> 41 int(123) 42 ["bar"]=> 43 int(456) 44} 45array(1) { 46 ["foo"]=> 47 int(123) 48} 49Done 50