xref: /PHP-8.4/ext/session/tests/bug68063.phpt (revision 217ea732)
1--TEST--
2Bug #68063 (Empty session IDs do still start sessions)
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--INI--
8session.use_strict_mode=0
9session.sid_length=40
10session.sid_bits_per_character=4
11--FILE--
12<?php
13// Empty session ID may happen by browser bugs
14
15// Could also be set with a cookie like "PHPSESSID=; path=/"
16session_id('');
17
18// Start the session with empty string should result in new session ID
19var_dump(session_start());
20
21// Returns newly created session ID
22var_dump(session_id());
23?>
24--EXPECTF--
25Deprecated: PHP Startup: session.sid_length INI setting is deprecated in Unknown on line 0
26bool(true)
27string(40) "%s"
28