Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57552 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68233 invoked from network); 28 Jan 2012 22:59:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2012 22:59:47 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qw0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:54635] helo=mail-qw0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/A5-09011-1ED742F4 for ; Sat, 28 Jan 2012 17:59:46 -0500 Received: by qadc14 with SMTP id c14so2051925qad.8 for ; Sat, 28 Jan 2012 14:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/2m9y9F1rpkIAVFszRqtGKYVuw6bRpuHAnDG74M1n1M=; b=lvIaGkKOZLgYaHvUKoUrk/ysvimVkSQIfH1FlK+srCjj6fyTVeIpfX4/7x8dp4j4DT ySw+p2Ddxs1XsIrDRBIyxKB3idq90YxWXR6qtGbNDCWpfDabR6jyERzLDVewTHt9Ps5p zPzU5dmWl/0C55be5RaayK6bwabp8Xi06HnwY= MIME-Version: 1.0 Received: by 10.224.186.209 with SMTP id ct17mr14969538qab.55.1327791583007; Sat, 28 Jan 2012 14:59:43 -0800 (PST) Received: by 10.229.242.1 with HTTP; Sat, 28 Jan 2012 14:59:42 -0800 (PST) In-Reply-To: <29.64.09011.35E642F4@pb1.pair.com> References: <29.64.09011.35E642F4@pb1.pair.com> Date: Sat, 28 Jan 2012 22:59:42 +0000 Message-ID: To: Justin Martin Cc: PHP Internals List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: PHP_SESSION_* constant values From: dragoonis@gmail.com (Paul Dragoonis) On Sat, Jan 28, 2012 at 9:53 PM, Justin Martin wrote: > 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. Encouraging people to check the manual is a good thing. As the constants are being used the user doesn't need to consult the manual at all as PHP_SESSION_DISABLED is very self-documenting. Again, a -1 from me. - Paul. > > 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 > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >