6 years ago in Php Variables and Syntax

$name = ’foo’; 
$$name = ’bar’; 
Result of echo $foo;

[A] foo
[B] $name
[C] $$name
[D] bar
Loading...
Next Question

Overall Stats

Attempted 55
Correct 13
Incorrect 20
Viewed 22

Answers

Guest
Guest
sana ullah
sana ullah - 7 months ago

sana ullah from Karachi, Pakistan is saying foo is correct answer

Shamsa hafeez
Shamsa hafeez - 7 months ago

Shamsa hafeez from Lahore, Pakistan is saying foo is correct answer

Dhanashri Bhuyar
Dhanashri Bhuyar - 8 months ago

Dhanashri Bhuyar from Mumbai, India is saying bar is correct answer

ayoub benigmim
ayoub benigmim - 8 months ago

ayoub benigmim from Casablanca, Morocco is saying foo is correct answer

Souad El
Souad El - 8 months ago

Souad El from Casablanca, Morocco is saying bar is correct answer

Related Questions

Which are invalid variable ?

  • [A] $name1
  • [B] $_name
  • [C] $1name
  • [D] All of the above

Output of echo true; ?

  • [A] true
  • [B] “true”
  • [C] 1
  • [D] All of the above

Output of this code echo "Here a literal brace + dollar sign: {\$";

  • [A] Here a literal brace + dollar sign: {\$
  • [B] Here a literal brace + dollar sign: \$
  • [C] Here a literal brace + dollar sign: {
  • [D] None of the above

$a = 10; $b = $a; $b = 20; Result of echo $a;

  • [A] 10
  • [B] 20
  • [C] 30
  • [D] None of the above