Programming Languages PHP Objective
Sep 23, 2025

What does the spaceship operator (<=>) return when comparing equal values?

Choose the correct answer:
A) true
B) false
D) null
Detailed Explanation

Explanation: The spaceship operator (<=>) returns -1 if left is less than right, 1 if left is greater than right, and 0 if they are equal. It's useful for sorting and comparison operations.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback