PHP 7 Session Options

session_start() is Old function of PHP.But from PHP 7 session_start() function accepts an array of options.

read_and_close option, which indicates that the session data should be read and then the session should immediately be closed unchanged.

cache_limiter to private and set the flag to close the session immediately after reading it

Syntax

session_start([,array]);
<?php
 session_start([
      'cache_limiter' => 'private',
      'read_and_close' => true,
   ]);
?>