Re: PHP_SESSION_* constant values
| From: | Stas Malyshev | Date: | Sat, 28 Jan 2012 21:10:00 +0000 |
| Subject: | Re: PHP_SESSION_* constant values | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57544@lists.php.net to get a copy of this message | ||
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