National_Instruments
200-500 · Question #232
You work as a Web Developer for Remote Inc. What will be the output when you try to run the script below? <?php $b = false; if($b = true) print("true"); else print("false"); ?>
The correct answer is A. true. See the full explanation below for the reasoning.
Question
You work as a Web Developer for Remote Inc. What will be the output when you try to run the script below? <?php $b = false; if($b = true) print("true"); else print("false"); ?>
Options
- Atrue
- Bfalse
- Ctrue false
- DThe script will throw an error message.
How the community answered
(29 responses)- A72% (21)
- B17% (5)
- C7% (2)
- D3% (1)
Community Discussion
No community discussion yet for this question.