|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-28 19:05 UTC] jimw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Feb 17 09:00:01 2026 UTC |
What I mean is like this: function &getDB() { global $DB; if (!isset $DB) $DB = new SomeDatabaseConnectionClass() return $DB } and in some function/method I just could use it like this getDB()->query_limit($sql_text); It sure will make my code a lot smaller. TIA, Zakaria