Sets or obtains the session ID.

Parameters

  • string $key Optional. If specified, sets the session ID to the value of `$key`.

Returns

mixed Session ID, or `null` if the session has not been started.

Source

						public static function key($key = null) {
		if ($key) {
			return session_id($key);
		}
		return session_id() ?: null;
	}