mirror of
https://github.com/php/php-src.git
synced 2026-03-25 16:52:18 +01:00
Using `php_error_docref()` is preferable since it outputs additional details (which function has been called and whether it is a startup or shutdown error), uses HTML markup, and also provides a link to the documentation, if configured. Since these deprecation warnings have been introduced recently[1][2], i.e. for PHP 8.4, there are no BC concerns. [1] <e8ff7c70f9> [2] <b36eac94d2> Co-authored-by: Máté Kocsis <kocsismate90@gmail.com>
28 lines
652 B
PHP
28 lines
652 B
PHP
--TEST--
|
|
Bug #68063 (Empty session IDs do still start sessions)
|
|
--EXTENSIONS--
|
|
session
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--INI--
|
|
session.use_strict_mode=0
|
|
session.sid_length=40
|
|
session.sid_bits_per_character=4
|
|
--FILE--
|
|
<?php
|
|
// Empty session ID may happen by browser bugs
|
|
|
|
// Could also be set with a cookie like "PHPSESSID=; path=/"
|
|
session_id('');
|
|
|
|
// Start the session with empty string should result in new session ID
|
|
var_dump(session_start());
|
|
|
|
// Returns newly created session ID
|
|
var_dump(session_id());
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: PHP Startup: session.sid_length INI setting is deprecated in Unknown on line 0
|
|
bool(true)
|
|
string(40) "%s"
|