summaryrefslogtreecommitdiff
path: root/ext/session/tests/session_unset_variation1.phpt
blob: dabb1eca5ea149f6edf0911b9c6efa3f46d60c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--TEST--
Test session_unset() function : variation
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php

ob_start();

/*
 * Prototype : void session_unset(void)
 * Description : Free all session variables
 * Source code : ext/session/session.c
 */

echo "*** Testing session_unset() : variation ***\n";

var_dump(session_unset());
var_dump(session_start());
var_dump(session_unset());
$_SESSION["foo"] = "Hello World!";
var_dump($_SESSION);
var_dump(session_destroy());
var_dump(session_unset());
var_dump($_SESSION);
var_dump(session_unset());

echo "Done";
ob_end_flush();
?>
--EXPECTF--
*** Testing session_unset() : variation ***
bool(false)
bool(true)
NULL
array(1) {
  ["foo"]=>
  string(12) "Hello World!"
}
bool(true)
bool(false)
array(1) {
  ["foo"]=>
  string(12) "Hello World!"
}
bool(false)
Done