# SessionHandler class return values

- Thread: https://externals.io/message/57169
- Original archive: https://news-web.php.net/php.internals/57169
- Started by Drak on 2012-01-03T05:59:47+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #57169 — Drak — 2012-01-03T05:59:47+00:00

URL: https://externals.io/message/57169#57169

I think something is wrong with the SessionHandler class and I dont know if
it requires a bug report.

According to the documentation at
http://www.php.net/manual/en/class.sessionhandler.php the various methods
return 0 for success and 1 for failure which is kind of backwards since 0
would normally be evaluated as false and 1 as true.  This is in direct
contradiction with the current expected behaviour of
 `session_set_save_handler()`
http://www.php.net/manual/en/function.session-set-save-handler.php which
expects true or false return values except for the read handler which
should always return a string.  What's the deal here?

I think the return values really should be true and false for this class,
as expected by `session_set_save_handler()`

Regards,

Drak
