Explain Spaceship Operator?

Marcel
Written by Marcel

Posted On: Jan 09, 2019

 

    1 Answer Written

  •  Marcel
    Posted by Swaraj

    Spaceship operator also is known as (combined comparison operator) is a new operator introduced in PHP 7. This operator is denoted by "<=>". This single operator can perform greater than, less than, and equal comparison between two operands. Its behavior is similar like strcmp() or version_compare() functions and can be used with integers, floats, strings, arrays, objects, etc.

Please Login or Register to leave a response.

Related Questions