I found this behavior and am no so happy with it:
<?php
session_name('blala');
session_start();
//maybe log in user here or some other stuff
session_regenerate_id();
$_SESSION['someValue'] = 'blah';
session_destroy();
?>
This will result in one orphaned session file per script run, because session_destroy(); will only delete the one file associated with the new session.
How can I make it so that the session file associated with the old session gets deleted, as soon as I have moved to a new session with session_regenerate_id() ?
Bjom