What is Spaceship operators?
PHP 7 introduces a new spacecraft operator (=>) for comparing two words. It’s also known as the combined contrast operator.
The spacecraft operator yields 0 if the two operands are equal, 1 if the left is bigger, and -1 if the right is larger. In the following table, the three-way comparison is essentially shown:

Example:-
Output:-

Latest posts by Ashwani Kumar (see all)
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023