RE: [PHP-PEAR] variable method names

From: Date: Wed, 14 Feb 2001 16:40:08 +0000
Subject: RE: [PHP-PEAR] variable method names
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1341@lists.php.net to get a copy of this message
I think calling variable methods with the braces: $this->{$method}($value); is better than without: $this->$method($value); It's too easy to overlook the dollar sign when there are no braces around the variable. Also, a lot of beginning PHP programmers that I've worked with take some time to get comfortable with dollar signs when dealing with objects, so the braces help signal that the variable method name is indeed intentional. In short, I find that braces make debugging easier. That said, I'm speaking of PHP style in general. I'm not sure if there are PEAR style rules on this issue. Aaron Web Developer yourfit.com

« previous php.pear (#1341) next »