|
|
Subscribe / Log in / New account

What to Expect When You're Expecting: PHP 7, Part 1 (Engine Yard)

What to Expect When You're Expecting: PHP 7, Part 1 (Engine Yard)

[Development] Posted Apr 3, 2015 9:16 UTC (Fri) by corbet

The Engine Yard blog has an introduction to the changes coming in the PHP 7 release. "My personal favorite addition to PHP 7 is the addition of the Combined Comparison Operator, <=>,otherwise known as the spaceship operator. [...] It effectively works like strcmp(), or version_compare(), returning -1 if the left operand is smaller than the right, 0 if they are equal, and 1 if the left is greater than the right. The major difference being that it can be used on any two operands, not just strings, but also integers, floats, arrays, etc."

Comments (37 posted)


Copyright © 2015, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds