+ 1
Can someone explain this challenge question to me?
What is the output of this code? $name="John"; $name="Lennon"; echo "$name $John"; answer is: John Lennon
2 Respostas
+ 12
$name is resolved to $John (value of $name is John), which is a new variable declaration. "Lennon" is assigned to $John.
So we have:
$name = "John" and $John = "Lennon".
+ 1
thanks! this makes sense!