summaryrefslogtreecommitdiff
path: root/ext/session/tests/bug72940.phpt
blob: d8f8c35bf45801a98ec21f3c6581b0d96cb18d8a (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
--TEST--
Bug #72940 - SID always defined
--INI--
error_reporting=-1
session.save_path=
session.name=PHPSESSID
session.save_handler=files
--SKIPIF--
<?php include('skipif.inc'); ?>
--COOKIE--
PHPSESSID=bug72940test
--GET--
PHPSESSID=bug72940get
--FILE--
<?php
ob_start();

ini_set('session.use_strict_mode', 0);
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 0);
session_start();
var_dump(session_id(), SID);
session_destroy();

ini_set('session.use_strict_mode', 0);
ini_set('session.use_cookies', 0);
ini_set('session.use_only_cookies', 0);
session_start();
var_dump(session_id(), SID);
session_destroy();
?>
--EXPECT--
string(12) "bug72940test"
string(0) ""
string(11) "bug72940get"
string(21) "PHPSESSID=bug72940get"