#46859 [Opn->WFx]: New switch statament

From: Date: Sat, 13 Dec 2008 16:58:29 +0000
Subject: #46859 [Opn->WFx]: New switch statament
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131975@lists.php.net to get a copy of this message
ID: 46859 Updated by: colder@php.net Reported By: 6r4845 at gmail dot com -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: Windows PHP Version: 5.3.0alpha3 New Comment: Adds no value, will be ambiguous parser-wise, and you miss the functionnality to have more than one cases for each blocks. Previous Comments: ------------------------------------------------------------------------ [2008-12-13 16:53:26] 6r4845 at gmail dot com Description: ------------ /** Hello, i am figured new -- better look switch statement. Statement by now, is so ugly, discuisting and far away from style... Exectly i don't like these case 'index': look ------ I am offering totaly new statement look, it would look something like class'es statement */ switch $var { case Index { echo "Hello world"; } case Second { echo "Hello again"; } case const NEWS_PAGE { echo "News page!"; } case Default { echo "Where do you thing you are?" } } /** And that is much more stylish than this: */ switch ($var){ case 'Index': echo "Hello world"; break; case 'Second': echo "Hello again"; break; case NEWS_PAGE: echo "News page"; break; default: echo "Where do you thing you are?" break; } /** I hope i take your attention, and will get reply about this :) Sorry for bad english */ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46859&edit=1

« previous php.bugs (#131975) next »