How to destroy the session on closing the browser
When browser window is closed, session should be terminated. Right now, if I close the window and type the application url, it
Native php sessions well expire on browser close. As long as you are not modifying the session cookie expiration time you should be fine.
If this is not happening then I am going to guess you are using a framework that is changing the php defaults or your php configuration has been changed.