PHP Operators Questions and Answers with Examples

PHP Programming : PHP Operators

PHP Operators MCQs With Answers and Examples. Operators are used to perform operations on variables and values. Whats new in PHP 5 Operators?
1. How many operator groups in PHP?
[A] 6
[B] 8
[C] 10
[D] 12
Loading...
2. How many Arithmetic Operators are in PHP?
[A] 6
[B] 3
[C] 5
[D] 7
Loading...
3. Which is the Negation operator in PHP?
[A] -$a
[B] $a / $b
[C] $a % $b
[D] $a ** $b
Loading...
4. Which is the Assignment operator in PHP?
[A] +=
[B] =
[C] *=
[D] All of the above
Loading...
5. How to Use Ternary Operator in PHP
[A] if(2 == 1) ? “yes” : “no”;
[B] a+=b
[C] a+b
[D] None of the above
Loading...
6. Which sign is used in PHP for the bitwise operator?
[A] <<
[B] ^
[C] >>
[D] All of the above
Loading...
7. Which operator is used for compare two values?
[A] Assignment Operator
[B] Bitwise Operator
[C] Arithmetic Operators
[D] Comparison Operators
Loading...
8. Which of the following PHP Operator can control Errors?
[A] $$
[B] %%
[C] @
[D] #
Loading...
9. How we can do Pre-Increment of a Variable?
[A] $a++
[B] $a+$a
[C] ++$a
[D] None of above
Loading...
10. Which of the following is PHP Logical Operator?
[A] AND
[B] OR
[C] XOR
[D] ALL of the above
Loading...

Are these questions helpful for you?

PHP Operators Programs/Functions



Comments: (Your feedback is valuable to us)