What are the drawbacks of using session_register and the recommended alternative in PHP?

The `session_register` function is deprecated in PHP and should not be used as it can lead to security vulnerabilities. Instead, it is recommended to directly assign values to `$_SESSION` superglobal array.

// Deprecated way using session_register
session_register('variable_name');

// Recommended way to set session variable
$_SESSION['variable_name'] = $value;