PHP Bug Hunt Easy +10 XP
Missing Dollar Sign
This PHP code has a syntax error.
PHPFind the bug
1
name = "Alice";2
echo name; The bug is on line 1
Select the correct fix
Show answer and explanation
Answer: Add $ before variable names
PHP variables must start with $ sign. Without it, PHP treats them as constants or keywords.
Hint: PHP variables have a special prefix.
What this challenge tests
Bug Hunt in PHP: variables, syntax.