php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40885 Allow chaining of comparison operators
Submitted: 2007-03-21 17:43 UTC Modified: 2020-01-08 13:19 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ed at webspecdesign dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: 5.2.1 OS: Any
Private report: No CVE-ID: None
 [2007-03-21 17:43 UTC] ed at webspecdesign dot com
Description:
------------
Basically just being able to use some syntactic sugar to evaluate an expression like this:

if ( 10 > $x > 5) {
	echo $x.' is greater than 5, but less than 10';
}

which is the same as:

if ($x < 10 && $x > 5) {
	echo $x.' is greater than 5, but less than 10';
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:09 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Scripting Engine problem
 [2016-12-31 00:09 UTC] cmb@php.net
There is already a draft RFC covering this feature request, so I'm
suspending the ticket.
 [2020-01-08 13:19 UTC] nikic@php.net
-Summary: New Feature for evaluating expressions +Summary: Allow chaining of comparison operators
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC