Re: Two ways to obtain an object property

From: Date: Thu, 16 Aug 2012 08:25:33 +0000
Subject: Re: Two ways to obtain an object property
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-318717@lists.php.net to get a copy of this message
On 08/15/2012 11:28 AM, phplist wrote:
This relates to a minor dilemma I come across from time and time, and I'm looking for advice [...] Within a site I have a User object, and within page code would like to have if ($crntUser->isASubscriber) {...} [...] if ($crntUser->isASubscriber()) {...} [...] Is either of these approaches preferable, or does it simply not matter?
Thanks to all who responded. Inevitably the answer is "it depends" but I've now got a much better feel about how to decide.
Roddie Grant

« previous php.general (#318717) next »