|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-20 13:01 UTC] ericf at micgi dot com
Here's a suggestion that we(local developers in Carbondale,IL) all feel would improve usability of the control structures in PHP.
What if in this statement...
if (($x == 'cats') && ($x == 'dogs') && ($x == 'birds')) {
we instead could say...
if ($x IN 'cats','dogs','birds') {
This would reduce typing and allow you to compare lists(arrays) in your conditional statements without using array functions.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Mar 27 03:00:01 2026 UTC |
if (in_array($x, array ('cats', 'dogs', 'birds))) { should be as useful as introducing a new construct. Derick