Edit report at https://bugs.php.net/bug.php?id=20421&edit=1
ID: 20421 Updated by: yohg...@php.net Reported by: ernest at vogelsinger dot at Summary: session_abort() and session_reset() -Status: Assigned +Status: Closed Type: Feature/Change Request Package: Session related Operating System: * PHP Version: * Assigned To: yohgaki Block user comment: N Private report: N New Comment: These functions are available 5.6 or later. Previous Comments: ------------------------------------------------------------------------ [2002-11-14 03:19:22] ernest at vogelsinger dot at What happens to a session when a script gets aborted? I don't believe there can be a one-shot solution for all situations, and I can easily imagine that one would want to keep the session data, but doesn't want to save anything changed _just_now_ (similar to a transaction rollback). A function session_abort() or session_reset() could do just this - abort any open session without modifying the session storage. Having such methods one could decide in a registered shutdown function how to proceed. session_abort() Works similar to session_write_close() except that it doesn't store session data session_reset() Rereads the $_SESSION superglobal from stored session data, destroying any modifications so far. The session remains open. Thanks for consideration (possibly in 4.3?), Ernest ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=20421&edit=1