Zend
200-710 · Question #105
Consider the following code: $result = $value1 ??? $value2; Which operator needs to be used instead of ??? so that $result equals $value1 if $value1 evaluates to true, and equals $value2 otherwise?…
See the full explanation below for the reasoning.
PHP Basics
Question
Consider the following code:
$result = $value1 ??? $value2;
Which operator needs to be used instead of ??? so that $result equals $value1 if $value1 evaluates to true, and equals $value2 otherwise? Just state the operator as it would be required in the code.
Options
- A
- B
- C
- D
Topics
#ternary operator#null coalescing#conditional operators#PHP operators
Community Discussion
No community discussion yet for this question.