Which of the following is a comparison operator in PHP?
- ==
- +
- =
- &
The == operator is a comparison operator in PHP. It is used to compare two values for equality. For example, $num1 == $num2 will return true if $num1 is equal to $num2, and false otherwise. The == operator checks for equality of values without considering the data types. Learn more: https://www.php.net/manual/en/language.operators.comparison.php
Loading...
Related Quiz
- Which of the following are valid data types in PHP?
- What is the while loop used for in PHP?
- What are some common practices in PHP data filtering and validation?
- You are writing a PHP script and you have an array. You want to execute a block of code for each element in the array. How would you do this using a foreach loop?
- In PHP, you can define an interface using the interface keyword like interface InterfaceName { ______ }.