As per version PHP 7 session_start can include an option array this function became obsolete. All cookie settings (and many more) can be included in an option array as a parameter to session_start():
<?php
session_start( [
'cookie_path' => '/',
'cookie_lifetime' => 300,
'cookie_secure' => true,
'cookie_httponly' => true,
'cookie_samesite' => 'lax',
] );