Re: [PHP-PEAR] variable method names

[email protected] (Chuck Hagenbuch)
Newsgroups php.pear
Message-ID <[email protected]>
Quoting Kendrick Vargas <[email protected]>:

> 	$this->$method($value);
>    or
> 	$this->{$method}($value);

As far as I know, curly braces are used to expand variables inside of double-
quoted strings. Since your method call is unlikely to be inside a double-quoted 
string, they're unnecessary. I dislike using syntax that adds no meaning, so 
I'd say don't use the braces. *shrug*

-chuck

--
Charles Hagenbuch, <[email protected]>
"My intuitive grasp of math often leads me astray." -Me
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.