1--TEST-- 2Test session_abort() 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_abort(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_abort(); 31 32session_id($session_id); 33session_start(); 34var_dump($_SESSION); // Should only have 'foo' 35 36echo "Done".PHP_EOL; 37 38?> 39--EXPECTF-- 40*** Testing session_abort() : basic functionality *** 41array(2) { 42 ["foo"]=> 43 int(123) 44 ["bar"]=> 45 int(456) 46} 47array(1) { 48 ["foo"]=> 49 int(123) 50} 51Done 52