Php 7 Tutorial:

Php 7 Spaceship operator


The spaceship operator is used for comparing two expressions. For example, $a <=> $b returns -1, 0 or 1 when $a is respectively less than, equal to, or greater than $b. Comparisons are performed according to PHP's usual type comparison rules.

Php 7 Spaceship operator Examples:

Related Php 7 Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.