Let's start a session:
session_start();
A new file is created on session_save_path()
folder, e.g. "sess_ovp3r00elb9q07jkb3kthcbhn5".
This file is a 0 bytes empty file.
I know I can remove it at the end of script this way:
if (session_status() == PHP_SESSION_ACTIVE AND !$_SESSION) @session_destroy();
But, why does PHP create this empty file?
Is it possible to change this behaviour and create the file only when a variable is set?
Thanks
EDIT: Duplicate answers have no relation with my question.