PHP session variables interchanged with local variables?
问题 I've encountered a very odd issue in regards to session variables and local variables in php. I'm trying to figure out if I am not understanding something about sessions in php or if this is an issue with the php version my host is using. Here is a very simple code to demonstrate the weird issue: session_start(); var_dump($kenny); var_dump($_SESSION['kenny']); $_SESSION['kenny']='def'; var_dump($kenny); var_dump($_SESSION['kenny']); $kenny = 'abc'; var_dump($kenny); var_dump($_SESSION['kenny'