On Fri, Dec 5, 2014 at 3:47 PM, Andrea Faulds <a...@ajf.me> wrote: > > > On 5 Dec 2014, at 14:36, Дмитрий <fr...@pop3.ru> wrote: > > > > Hi! > > > > I followed by https://wiki.php.net/rfc/howto and I would like to > propose a concept "comparison chain" to implementing to future PHP versions. > > It would be very usable if PHP can do that in python-style. > > > > Thank for your attension! > > Are you saying to allow (1 < x < 2) etc.? That would be nice, although > it’s a backwards-compatibility break as currently (1 < x < 2) would do > something different, as would, say, ($x == $y == $z). >
Comparisons are non-associative in PHP [1], so something like $x == $y == $z is currently invalid code. As such this would not break compatibility. Nikita [1]: http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#81