Does declaring an unnecessary variable in PHP consumes memory? <p>I usually do this in PHP for better readability but I don't know if it consumes memory or has any other issues? Let's say I have this code:</p> <pre><code>$user = getUser(); // getUser() will return an array </code></pre> <p>I could do:</p> <pre><code>$email = $user["email"]; sendEmail($email); </code></pre> <p>Without declaring the variable $email I could do:</p> <pre><code>sendEmail($user["email"]); </code></pre> <p>Which one is better? Consider that this is just a very simple example.</p>