HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

session_module_name

Description

The session_module_name of Session for PHP gets and/or sets the current session module.

Syntax

session_module_name(
    ?string $module = null
): string|false

Parameters

module

If module is specified and not null, that module will be used instead. Passing "user" to this parameter is forbidden. Instead session_set_save_handler() has to be called to set a user defined session handler.

Return

Returns the name of the current session module, or false on failure.

Examples

1 · void

<?

$return = session_module_name();

echo $return;
files

2 · module · previous

<?

$module = "memcache";

$return = session_module_name($module);

echo $return;
files

3 · module · current

<?

$module = "memcache";

session_module_name($module);

$return = session_module_name();

echo $return;
memcache