src/Session.php
private static function cfgGetDefaultName()
    {
        $nameDefault = null;
        $sessionNamePref = array('SESSIONID', \session_name());
        foreach ($sessionNamePref as $nameTest) {
            $useCookies = isset(self::$cfgExplicitlySet['useCookies'])
                ? self::$cfgExplicitlySet['useCookies']
                : self::$cfgStatic['useCookies'];
            if ($useCookies && !empty($_COOKIE[$nameTest])) {
                $nameDefault = $nameTest;
                self::$status['requestId'] = $_COOKIE[$nameTest];
                break;
            }
            $useOnlyCookies = isset(self::$cfgExplicitlySet['useOnlyCookies'])
                ? self::$cfgExplicitlySet['useOnlyCookies']
                : self::$cfgStatic['useOnlyCookies'];
            if (!$useOnlyCookies && !empty($_GET[$nameTest])) {
                $nameDefault = $nameTest;
                self::$status['requestId'] = $_GET[$nameTest];
                break;
            }
        }
        if (!$nameDefault) {
            $nameDefault = $sessionNamePref[0];
        }
        return $nameDefault;
    }
private static function cfgGetDefaultName()
    {
        $nameDefault = null;
        $sessionNamePref = array('SESSIONID', \session_name());
        foreach ($sessionNamePref as $nameTest) {
            $useCookies = isset(self::$cfgExplicitlySet['useCookies'])
                ? self::$cfgExplicitlySet['useCookies']
                : self::$cfgStatic['useCookies'];
            if ($useCookies && !empty($_COOKIE[$nameTest])) {
                $nameDefault = $nameTest;
                self::$status['requestId'] = $_COOKIE[$nameTest];
                break;
            }
            $useOnlyCookies = isset(self::$cfgExplicitlySet['useOnlyCookies'])
                ? self::$cfgExplicitlySet['useOnlyCookies']
                : self::$cfgStatic['useOnlyCookies'];
            if (!$useOnlyCookies && !empty($_GET[$nameTest])) {
                $nameDefault = $nameTest;
                self::$status['requestId'] = $_GET[$nameTest];
                break;
            }
        }
        if (!$nameDefault) {
            $nameDefault = $sessionNamePref[0];
        }
        return $nameDefault;
    }
private static function cfgGetDefaultName ( ) { $ nameDefault = null ; $ sessionNamePref = array ( 'SESSIONID' , \ session_name ( ) ) ; foreach ( $ sessionNamePref as $ nameTest ) { $ useCookies = isset ( self :: $ cfgExplicitlySet [ 'useCookies' ] ) ? self :: $ cfgExplicitlySet [ 'useCookies' ] : self :: $ cfgStatic [ 'useCookies' ] ; if ( $ useCookies && ! empty ( $ _COOKIE [ $ nameTest ] ) ) { $ nameDefault = $ nameTest ; self :: $ status [ 'requestId' ] = $ _COOKIE [ $ nameTest ] ; break ; } $ useOnlyCookies = isset ( self :: $ cfgExplicitlySet [ 'useOnlyCookies' ] ) ? self :: $ cfgExplicitlySet [ 'useOnlyCookies' ] : self :: $ cfgStatic [ 'useOnlyCookies' ] ; if ( ! $ useOnlyCookies && ! empty ( $ _GET [ $ nameTest ] ) ) { $ nameDefault = $ nameTest ; self :: $ status [ 'requestId' ] = $ _GET [ $ nameTest ] ; break ; } } if ( ! $ nameDefault ) { $ nameDefault = $ sessionNamePref [ 0 ] ; } return $ nameDefault ; }
Determine session name

depending on useCookies and useOnlyCookies options:
if "PHPSESSID" param passed as COOKIE/GET then "PHPSESSID" will be used
Otherwise, SESSIONID will be used  (ie preference is SESSIONID)

@return string
Determine session name