Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48048 invoked from network); 28 Jan 2012 21:10:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2012 21:10:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.153 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.153 smtp153.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.153] ([207.97.245.153:41359] helo=smtp153.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/23-09011-C24642F4 for ; Sat, 28 Jan 2012 16:10:04 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp45.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 9014B90303; Sat, 28 Jan 2012 16:10:01 -0500 (EST) X-Virus-Scanned: OK Received: by smtp45.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 325CF90236; Sat, 28 Jan 2012 16:10:01 -0500 (EST) Message-ID: <4F246428.6060807@sugarcrm.com> Date: Sat, 28 Jan 2012 13:10:00 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Justin Martin CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP_SESSION_* constant values From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > 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? Yes, there's no reason to do that since you can just compare to the constant - that's why they exist in the first place. Then gain of not typing couple of characters is much less than the confusion that would result from changing the constants. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227