mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +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>
40 lines
910 B
PHP
40 lines
910 B
PHP
--TEST--
|
|
Test session_id() function : basic functionality
|
|
--EXTENSIONS--
|
|
session
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
ob_start();
|
|
|
|
echo "*** Testing session_id() : basic functionality ***\n";
|
|
|
|
ini_set('session.sid_bits_per_character', 6);
|
|
ini_set('session.sid_length', 120);
|
|
session_start();
|
|
var_dump(session_id());
|
|
session_commit();
|
|
|
|
ini_set('session.sid_bits_per_character', 4);
|
|
ini_set('session.sid_length', 22);
|
|
session_start();
|
|
session_regenerate_id();
|
|
var_dump(session_id());
|
|
session_commit();
|
|
|
|
echo "Done";
|
|
?>
|
|
--EXPECTF--
|
|
*** Testing session_id() : basic functionality ***
|
|
|
|
Deprecated: ini_set(): session.sid_bits_per_character INI setting is deprecated in %s on line %d
|
|
|
|
Deprecated: ini_set(): session.sid_length INI setting is deprecated in %s on line %d
|
|
string(120) "%s"
|
|
|
|
Deprecated: ini_set(): session.sid_length INI setting is deprecated in %s on line %d
|
|
string(22) "%s"
|
|
Done
|