//cookie记录的session_id立刻改变了
session_start();
echo "old:".session_id();
session_regenerate_id();
echo "new:".session_id();
//这个不会改变cookie记录的session_id值
session_start();
echo "old:".session_id();
session_destroy();
session_start();
echo "new:".session_id();
//这个不会改变当次cookie记录的session_id值,但是下次访问就变了
session_start();
echo "old:".session_id();
session_regenerate_id();
session_destroy();
session_start();
echo "new:".session_id();
//这个会立刻改变cookie记录的session_id值
session_start();
echo "old:".session_id();
session_destroy();
session_start();
session_regenerate_id();
echo "new:".session_id();