Zend 200-710 Question Answer
What is the difference between the spaceship operator (<=>) and the strcmp() function?
There is no difference in functionality
strcmp() returns a Boolean value, the spaceship operator a number
strcmp() does a case-intensive comparison, the spaceship operator does not
The spaceship operator returns -1, 0 or 1; strcmp() may return any integer
TESTED 09 Jul 2025
Copyright © 2014-2025 ACE4Sure. All Rights Reserved