session_remove

Declaration

session_remove(string$name):
Source: /includes/common/session.php
The function removes a specified variable from the current session. It uses a version-compatibility check: if session functions are enabled and the PHP version is below 5.3.0, it calls the deprecated `session_unregister()`, otherwise it uses the modern `unset($_SESSION[$name])` approach. This ensures the code works correctly on both older and newer PHP environments.

Parameters

  • $name

Return values

See also