Re: session_reset() and session_abort() to send errors

From: Date: Thu, 27 Mar 2014 10:38:16 +0000
Subject: Re: session_reset() and session_abort() to send errors
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-73452@lists.php.net to get a copy of this message
Hi all, On Wed, Mar 26, 2014 at 6:57 PM, Julien Pauli <jpauli@php.net> wrote: > Yup, I agree that I dont really see a use case for session_reset(). > The implementation looks strange. > > Yasuo, could you clarify please ? > This function is useful for session save handlers that do not lock session data. Example is memcached. This function could be used re-read session data to mitigate over written session data with unlock session data. Andrey, just because you don't think of usage, it does not mean it does not mean unneeded or not useful. You are better to ask the reason behind why first. Good library should have defined API for specific tasks, too. You also has misunderstanding about why delayed deletion for session_regenerate_id() is mandatory. BTW, raising errors for invalid calls has issues, so I send PR to discuss. https://github.com/php/php-src/pull/634 Regards, P.S. If I should choose to remove this or session_gc(), I choose this because session_gc() is mandatory API for decent session manager. -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#73452) next »