Req #40438 [Opn->Sus]: Use mathematical sets in if conditions

From: Date: Mon, 23 Nov 2020 15:40:35 +0000
Subject: Req #40438 [Opn->Sus]: Use mathematical sets in if conditions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230543@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=40438&edit=1

 ID:                 40438
 Updated by:         cmb@php.net
 Reported by:        anmeldung at snowgarden dot ch
 Summary:            Use mathematical sets in if conditions
-Status:             Open
+Status:             Suspended
 Type:               Feature/Change Request
 Package:            Scripting Engine problem
 Operating System:   Irrelevant
 PHP Version:        5.2.1
 Block user comment: N
 Private report:     N

 New Comment:

This feature needs discussion for which this bug tracker is not
really suitable.  Therefore, I you, or anybody else, is still
interested in this, please forward your request to the internals
mailing list.  For the time being, I'm suspending this ticket.


Previous Comments:
------------------------------------------------------------------------
[2007-02-11 23:28:28] anmeldung at snowgarden dot ch

Description:
------------
It would be nice, if you can use some mathematical sets in if conditions. This would help to filter
input values like integers, string and floats.
For example if you'll check if an input value within your range:
Normal representation -> if ($input >= 0 && $input <= 2)
Math. Set representation -> if ($input === [0; 2])

You can use braces (but they are used in PHP) to represent sets of string or numbers like ->
colors === {'red', 'blue', 'yellow'}

There is also an international standard (ISO 31-11) that defines sets
(http://en.wikipedia.org/wiki/ISO_31-11#Sets)



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=40438&edit=1


Thread (2 messages)

« previous php.bugs (#230543) next »