|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-13 16:58 UTC] colder@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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 */