forked from tricky/php-memcache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path036.phpt
More file actions
42 lines (34 loc) · 886 Bytes
/
Copy path036.phpt
File metadata and controls
42 lines (34 loc) · 886 Bytes
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
--TEST--
ini_set('session.save_handler')
--SKIPIF--
<?php include 'connect.inc'; if (!MEMCACHE_HAVE_SESSION) print 'skip not compiled with session support'; ?>
--FILE--
<?php
include 'connect.inc';
$session_save_path = "tcp://$host:$port?persistent=1&weight=2&timeout=2&retry_interval=10, ,tcp://$host:$port ";
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', $session_save_path);
$result1 = session_start();
$id = session_id();
$_SESSION['_test_key'] = 'Test';
$result2 = $memcache->get($id);
session_write_close();
$result3 = $memcache->get($id);
// Test destroy
session_start();
$result4 = session_destroy();
$result5 = $memcache->get($id);
var_dump($result1);
var_dump($id);
var_dump($result2);
var_dump($result3);
var_dump($result4);
var_dump($result5);
?>
--EXPECTF--
bool(true)
string(%d) "%s"
bool(false)
string(%d) "%s"
bool(true)
bool(false)