Re: Little switch improvement: get the used variable

From: Date: Tue, 23 Sep 2014 07:29:40 +0000
Subject: Re: Little switch improvement: get the used variable
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-77504@lists.php.net to get a copy of this message
Hi Martin, > The get_the_used_switch_variable() is just a placeholder, name > can be > changed to something natural...maybe a constant. I feel this has diminished utility once you consider that the "switch variable" is actually an expression and could well include multiple $variables. Plus there's also the pattern switch(true) { } where the interesting variables appear in case statements. Hard for me to see the justification, but maybe I'm missing it. My $0.02... -- Sandy

« previous php.internals (#77504) next »