RE: [PHP-DEV] Re: session_start read_only
| From: | Ford, Mike | Date: | Tue, 01 Apr 2014 09:56:06 +0000 |
| Subject: | RE: [PHP-DEV] Re: session_start read_only | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-73500@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: yohgaki@gmail.com [mailto:yohgaki@gmail.com] On Behalf Of
> Yasuo Ohgaki
> Sent: 01 April 2014 07:19
> > It is a design problem, but the 'read_only' name is highly
> misleading
> > (especially for an option to session_start()), which is a language
> > (design) level issue. It's a nice feature, but should be
> accessible
> > through better API.
> >
>
> It's good enough name. IMO. I renamed it to "read_and_close",
> though.
>
> read_only (or read_and_close) - Read and initialize $_SESSION, then
> close
> session immediately.
>
> It wouldn't cause much trouble. AFAIK, you think it's misleading.
> What others think?
As a developer using PHP, I completely agree with Andrey on this point
-- it was my immediate reaction on reading the original proposal. A
call to session_start() that doesn't actually fully start a session
is utterly misleading and wrong -- this need (if there is one, of
which I'm not convinced) should be filled by a new function named
something like session_read(), or session_load(), or even
session_get_values().
Cheers!
Mike
--
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
403a Leslie Silver Building, City Campus, Leeds Metropolitan University,
Woodhouse Lane, LEEDS, LS1 3ES, United Kingdom
E: m.ford@leedsmet.ac.uk T: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm