On Sat, Jan 28, 2012 at 9:53 PM, Justin Martin <frozenf...@php.net> 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 > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php