Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP operator <> [duplicate]

What does the following code do? A link to something in the PHP manual would also be nice.

if ($_SERVER['SERVER_PORT'] <> 443) {     doSomething(); } 
like image 968
ocergynohtna Avatar asked Oct 30 '08 04:10

ocergynohtna


People also ask

What does <> mean in PHP?

The spaceship operator <=> is the latest comparison operator added in PHP 7. It is a non-associative binary operator with the same precedence as equality operators ( == , !=

Why -> is used in PHP?

The object operator, -> , is used in object scope to access methods and properties of an object. It's meaning is to say that what is on the right of the operator is a member of the object instantiated into the variable on the left side of the operator.

What is not equal to in PHP?

Introduction to PHP not equal. One of the comparison operators in PHP is not equal, which is represented by the symbol != or <> and whenever we want to compare the data types of the two given values, we make use of not equal operator in PHP.

What is -> called in PHP?

What is -> in PHP? This is referred to as the object operator, or sometimes the single arrow operator. It is an access operator used for access/call methods and properties in a PHP object in Object-Oriented Programming (OOP). Example.


1 Answers

Same as !=, "Not equal"

false <> true // operator will evaluate expression as true false != true // operator will evaluate expression as true 

Here is some reference: PHP Comparison Operators

like image 91
Christian C. Salvadó Avatar answered Sep 24 '22 21:09

Christian C. Salvadó