File: session_basic3.phpt

package info (click to toggle)
php-memcached 3.1.5%2B2.2.0-5%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,952 kB
  • sloc: ansic: 9,587; xml: 1,318; php: 385; pascal: 87; sh: 12; makefile: 5
file content (46 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (4)
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
--TEST--
Session basic open, write, destroy
--SKIPIF--
<?php 
include dirname(__FILE__) . "/skipif.inc"; 
if (!Memcached::HAVE_SESSION) print "skip";
?>
--INI--
session.save_handler = memcached
memcached.sess_binary_protocol = Off
--FILE--
<?php
include dirname (__FILE__) . '/config.inc';
ini_set ('session.save_path', MEMC_SERVER_HOST . ':' . MEMC_SERVER_PORT);

ob_start();

session_start();
$_SESSION['foo'] = 1;
session_write_close();

$_SESSION = NULL;

var_dump($_SESSION);
session_start([
	'read_and_close' => true
]);
var_dump($_SESSION);
session_write_close();

session_start();
session_destroy();

session_start();
var_dump($_SESSION);
session_write_close();


--EXPECT--
NULL
array(1) {
  ["foo"]=>
  int(1)
}
array(0) {
}