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