Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32679 invoked from network); 28 Jan 2012 19:17:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2012 19:17:45 -0000 X-Host-Fingerprint: 207.216.62.109 unknown Received: from [207.216.62.109] ([207.216.62.109:28063] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/E1-09011-7D9442F4 for ; Sat, 28 Jan 2012 14:17:43 -0500 Message-ID: To: internals@lists.php.net Date: Sat, 28 Jan 2012 11:17:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 207.216.62.109 Subject: PHP_SESSION_* constant values From: frozenfire@php.net (Justin Martin) 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