What is the difference between session_register() and $_SESSION array ?
What is the difference between session_register() and $_SESSION array ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the manual page for
session_register:There are differences (e.g.,
session_registeraccepts names of global variables, automatically starts the session, etc), but I think a sufficient answer is “don’t usesession_register” unless you really want to know the list of caveats for educational purposes.Just to elaborate on one point that makes
session_registerbad: it relies on global variables (andregister_globals).