Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57548 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57022 invoked from network); 28 Jan 2012 21:53:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2012 21:53:24 -0000 X-Host-Fingerprint: 207.216.62.109 unknown Received: from [207.216.62.109] ([207.216.62.109:16397] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/64-09011-35E642F4 for ; Sat, 28 Jan 2012 16:53:24 -0500 Message-ID: <29.64.09011.35E642F4@pb1.pair.com> To: internals@lists.php.net Date: Sat, 28 Jan 2012 13:53:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 207.216.62.109 Subject: Re: PHP_SESSION_* constant values From: frozenfire@php.net (Justin Martin) Someone actually just pointed out to me that if(-1) returns true. In that case, I suppose my suggestion doesn't quite work. The reason I suggest this is that I suspect people will constantly be looking up what the constants are called. On 12-01-28 11:17 AM, Justin Martin wrote: > Hello everyone, > > For the result of session_status(), the corresponding constants for the > sessions state are > > - PHP_SESSION_DISABLED = 0 > - PHP_SESSION_NONE = 1 > - PHP_SESSION_ACTIVE = 2 > > I'd like to suggest we change these values to > > - PHP_SESSION_DISABLED = -1 > - PHP_SESSION_NONE = 0 > - PHP_SESSION_ACTIVE = 1 > > This way, one can do if(session_status()) to check if there is an active > session, rather than having to compare the result to a constant. > > Any objections? > > Thanks, > Justin Martin