Re: Opinion about the using $GLOBALS directly
| From: | Robin Vickery | Date: | Wed, 19 Dec 2007 15:07:14 +0000 |
| Subject: | Re: Opinion about the using $GLOBALS directly | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266086@lists.php.net to get a copy of this message | ||
On 19/12/2007, js <ebgssth@gmail.com> wrote:
> Hi Jochem,
>
> Sorry, I missed "static".
> So, getDB() would works like singleton, right?
> I agree that's better method to manage dbh.
The technique is called memoization (http://en.wikipedia.org/wiki/Memoization).
-robin