Multiple choice technology programming languages

The following will result in which of the following, if the prize is currently "10 Euros" print 'You won $prize';

  1. You won $5.00

  2. You won 5 dollars

  3. You won $prize

  4. You won $5

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

PHP treats single-quoted strings as literal text. The variable $prize is not interpolated when inside single quotes, so the statement prints exactly 'You won $prize' without substituting the variable's value. Double quotes would be required for variable interpolation to occur.