how this code echo dollardollar as a result? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

how this code echo dollardollar as a result?

$dollar = 'dollar'; $dollardollar = $dollar.'dollar'; $dollardollar = $dollar; echo $$dollar;

27th Jun 2017, 5:25 AM
Ahmed Awad
Ahmed Awad - avatar
1 Respuesta
+ 2
I'm wondering: wouldn't the second line give an error as the variable name (value of $dollardollar) is still empty at that time?
28th Jun 2017, 11:03 PM
Bart Hermans