MCQs
Total Questions : 10
Answer: Option D. -> Error
Variables should start with a $ symbol, since one, two, three, four don't begin with $ symbol we will get an error.
Answer: Option C. -> 1.25
You can use _ in a variable name.
Answer: Option D. -> Error
You can not use the $ in between the variable name.
Answer: Option B. -> Nothing
There will no output returned as the variable $red does not hold any value.
Answer: Option A. -> 0.75
Since the variable initialised is $On_e and the variable in the echo statement is $on_e the echo statement treats $on_e as 0;
Answer: Option A. -> 4.5
You can use numbers in a variable name.
Answer: Option D. -> Error
You can not use var before a variable name.
Answer: Option D. -> Error
A variable name can not start with a numeric value.
Answer: Option A. -> Hello World
Since there is a semi-colon in between $hello and $bye, the line ends at $hello. However $bye would have printed if a echo was present before "$bye.
Answer: Option D. -> Error
Unlike other programming languages there are no data types in PHP.