What is the purpose of setting a custom session name in PHP cookies?

Setting a custom session name in PHP cookies can help improve security by making it harder for attackers to guess the session name and potentially hijack sessions. It also allows for better organization and management of sessions in larger applications where multiple session variables are being used.

<?php
// Set a custom session name
session_name("my_custom_session");

// Start the session
session_start();

// Other session-related code here
?>