can any one please let me know the basic differences between
$GLOBALS["test"] and global $test
and, will it make sense that, if i use $GLOBALS["test"] instead of $_SESSION['test']?
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.
No, session is different thing from a variable that is available globally.
$GLOBALS
http://php.net/manual/en/reserved.variables.globals.php
Explanation:
$GLOBALSis an associative array available throughout your script, there is no need to useglobal $test